importrandomimporttime# --- Clue functions ---
#Create a structure for each clue
defclue_template():#Change answer
answer="template"#Change the clue
print("Clue: Template \n template (#)")print("")guess=input("Your answer: ").strip().lower()ifguess==answer:print("")print("Correct! The answer is: \n"+answer.upper())else:print("")print("Not quite. You answered: \n"+guess)print("The correct answer is: \n"+answer.upper())### End of Template Structure
defclue_asymptote():#Change answer
answer="asymptote"#Change the clue
print("Clue: Can't touch this, \nas my poet rearranged (9)")print("")guess=input("Your answer: ").strip().lower()ifguess==answer:print("")print("Correct! The answer is \n"+answer.upper())else:print("")print("Not quite. You answered: \n"+guess)print("The correct answer is: \n"+answer.upper())defclue_ratio():#Change answer
answer="ratio"#Change the clue
print("Clue: A trio like \na 3-egg omelet (5)")print("")guess=input("Your answer: ").strip().lower()ifguess==answer:print("")print("Correct! The answer is \n"+answer.upper())else:print("")print("Not quite. You answered: \n"+guess)print("The correct answer is: \n"+answer.upper())defclue_quest():answer="quest"print("Clue: Inquisitive, \nminus eight (5)")print("")guess=input("Your answer: ").strip().lower()ifguess==answer:print("")print("Correct! The answer is \n"+answer.upper())else:print("")print("Not quite. You answered: \n"+guess)print("The correct answer is: \n"+answer.upper())defclue_badge():answer="badge"print("Clue: Officer's proof, \n using guitar strings (5)")print("")guess=input("Your answer: ").strip().lower()ifguess==answer:print("")print("Correct! The answer is \n"+answer.upper())else:print("")print("Not quite. You answered: \n"+guess)print("The correct answer is: \n"+answer.upper())defclue_magma():answer="magma"print("Clue: Below the earth, \n gamma in turmoil")print("")guess=input("Your answer: ").strip().lower()ifguess==answer:print("")print("Correct! The answer is \n"+answer.upper())else:print("")print("Not quite. You answered: \n"+guess)print("The correct answer is: \n"+answer.upper())# --- List of clue functions ---
# Add new ones here as you create them.
clues=[clue_quest,clue_badge,clue_magma,clue_ratio,clue_asymptote]# --- Cycle through all clues in random order ---
defrun_all_clues_once():print("Minute Cryptic")# Make a shuffled copy so the original list stays intact
remaining=clues[:]# copy
whilelen(remaining)>0:index=random.randint(0,len(remaining)-1)chosen=remaining.pop(index)chosen()#Delay 1 second
time.sleep(1)iflen(remaining)>0:print("\nNext Clue\n")# shuffle in place
print("\nNo more available clues")run_all_clues_once()
During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:
Ensure the proper functioning of the site (essential cookies); and
Track your browsing to send you personalized communications if you have created a professional account on the site and can be contacted (audience measurement cookies).
With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.