Advertisement
makispaiktis

25122021

Dec 21st, 2021 (edited)
670
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 17.10 KB | None | 0 0
  1. from random import randrange
  2.  
  3. # Auxiliary Functions
  4. # 1. doIContinue
  5. def doIContinue():
  6.     answer = input("Continue? ")
  7.     if answer in positiveAnswers:
  8.         print(POSITIVE_CONTINUE[randrange(len(POSITIVE_CONTINUE))])
  9.         print()
  10.     else:
  11.         print(NEGATIVE_CONTINUE[randrange(len(NEGATIVE_CONTINUE))])
  12.         print()
  13.  
  14. # 2. Score announcement
  15. def announceScore(correct, counter):
  16.     percentage = correct / counter
  17.     percentage100 = 100 * percentage
  18.     if percentage100 == int(percentage100):
  19.         print("Score: " + str(correct) + "/" + str(counter) + " = " + str(percentage100) + "%.")
  20.     else:
  21.         print(print("Score: " + str(correct) + "/" + str(counter) + " = " + str(round(percentage100, 1)) + "%."))
  22.  
  23. # 3. Next question
  24. def next(correct, counter):
  25.     doIContinue()
  26.     announceScore(correct, counter)
  27.     print()
  28.  
  29.  
  30. # 4. Reveal the truth
  31. def revealTheTruth(a, b, c, d, e):
  32.     print()
  33.     print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
  34.     a = a.upper()
  35.     b = b.upper()
  36.     c = c.upper()
  37.     d = d.upper()
  38.     e = e.upper()
  39.     print(a[0], a[1], " - ", a[2:])
  40.     print(b[0], b[1], " - ", b[2:])
  41.     print(c[0], c[1], " - ", c[2:])
  42.     print(d[0], d[1], " - ", d[2:])
  43.     print(e[0], e[1], " - ", e[2:])
  44.     print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
  45.  
  46.  
  47. # 5. Eyxes
  48. def eyxes():
  49.     print("Happy birthday little Angie with all my love! May the new year bring us happiness and good luck!")
  50.     print("Your little tomato loves you very much and wants you to be with him!")
  51.     print("I hope you enjoyed the mini quiz about us! It was an effort to prove you my love and care.")
  52.     print("I've been planning this for 2 days only this year, because I learned a lot from the previous year quiz.")
  53.     print("In this one, you were in the position of making guesses about me. Like me last year, you also had to be 'tried'!")
  54.     print("I also hope you are glad in the future and happy in all your life! I love you my little princess <3!")
  55.     print()
  56.     print("Real score in my heart: 100 / 100")
  57.     print()
  58.  
  59. # MAIN FUNCTION
  60. # LAWAUTH, 55 FOCUS
  61. # Data answers
  62. positiveAnswers = ["yes", "sure", "of course", "why not", "yeah"]
  63. negativeAnswers = ["no", "no way", "nope"]
  64. POSITIVE1 = "Ok nice, let's begin!"
  65. NEGATIVE1 = "OK, from now on don't be so negative. Let's start."
  66. POSITIVE_CONTINUE = ["Ok nice, let's continue!", "We go on.", "Nice, we can continue."]
  67. NEGATIVE_CONTINUE = ["OK, from now on don't be so negative. Let's continue.", "There is no reason not to continue. Of course, we go on.", "After democratical conversation, we agreed to go on!"]
  68. CORRECT = "Of course, you knew it. 1 point for you. Yeahhh!!!!"
  69. WRONG = "I made a wrong guess. I guessed "
  70. POINTS_WRONG = "Score will not increase after this answer..."
  71. CORRECT_ANGIE = "You are right! That was the answer!"
  72. WRONG_ANGIE = "No, that's wrong. The correct one was "
  73.  
  74.  
  75. # 0. Introduction - Initialization
  76. print()
  77. print("Hello again. I know you didn't wait me, but here I am to surprise you again.")
  78. print("You are going to take a test, in which we will check if the answers are the same.")
  79. print("The test includes 20 questions you have to reply!")
  80. answer1 = input("Ready? ")
  81. if answer1.lower() in positiveAnswers:
  82.     print(POSITIVE1)
  83. elif answer1.lower() in negativeAnswers:
  84.     print(NEGATIVE1)
  85. print()
  86. print()
  87. counter = 0
  88. correct = 0
  89.  
  90.  
  91. # 1st section
  92. print("~~~~ 1st section ~~~~")
  93.  
  94. # 1a. Name
  95. print("**************************************************************************************************")
  96. name = input("1) What's your name? ")
  97. counter += 1
  98. namesExpected = ["angie", "angeliki", "aggeliki", "angie metheniti", "angeliki metheniti", "aggeliki metheniti"]
  99. if name.lower() in namesExpected:
  100.     print(CORRECT)
  101.     print("(I know that was an easy one, but I wanted to give you a boost to continue <3.)")
  102.     correct += 1
  103. else:
  104.     print(WRONG + "Angie...")
  105.     print(POINTS_WRONG)
  106. next(correct, counter)
  107.  
  108.  
  109. # 1b. Age in decibels
  110. print("**************************************************************************************************")
  111. print("Now, a difficult one. YOU have to answer this question (as the following ones also).")
  112. print("The outcome depends completely on you and on the way you hear me when I talk.")
  113. print("Reminder: 10 is 10 decibels")
  114. dB = int(input("2) How many decibels is your age equal to: "))
  115. counter += 1
  116. if dB == 100:
  117.     print("Wow, that's amazing! You remember the decibels law. Congratulations!")
  118.     correct += 1
  119. else:
  120.     print("Your answer is wrong. The correct answer is 100, but I'm gonna count this as a win, because it was a difficult question for you.")
  121.     correct += 1
  122. next(correct, counter)
  123.  
  124. # 1c. Markopoulo
  125. print("**************************************************************************************************")
  126. print("The following question is about your city (he he he he.....)")
  127. print("3) According to Google, tell me an upper bound of Markopoulo's population (answer 'a', 'b' or 'c' - 1 character answer):")
  128. POSSIBLE = ['a) 5.000, ', 'b) 10.000, ', 'c) 15.000']
  129. print(''.join(POSSIBLE))
  130. population = input("Population (a, b, or c): ")
  131. counter += 1
  132. if population.lower() == 'b':
  133.     print(CORRECT_ANGIE)
  134.     correct += 1
  135. else:
  136.     print(WRONG_ANGIE + 'b) 10.000.')
  137.     print(POINTS_WRONG)
  138. next(correct, counter)
  139.  
  140.  
  141. # 1d. Freddie Mercury
  142. print("**************************************************************************************************")
  143. print("This question is about the programme's creator, Thomas.")
  144. print("Last year, Thomas took this test and gave it to you trying to guess your answers.")
  145. print("This time, it's your turn. You must guess what he thought of. You say you are keen on this 'hobby'. Let's see")
  146. singer = input("4) Who is Thomas' favorite frontman-singer? ")
  147. counter += 1
  148. singerList= ["freddie", "freddie mercury", "mercury", "freddy", "freddy mercury"]
  149. if singer.lower() in singerList:
  150.     print(CORRECT_ANGIE)
  151.     correct += 1
  152. else:
  153.     print(WRONG_ANGIE + "Freddie Mercury.")
  154.     print(POINTS_WRONG)
  155. next(correct, counter)
  156.  
  157.  
  158. # 1e. NaVi
  159. print("**************************************************************************************************")
  160. print("You must have known that Thomas loves a team in CSGO.")
  161. team = input("5) What's this team name? ")
  162. counter += 1
  163. teamList = ["navi", "natus vincere"]
  164. if team.lower() in teamList:
  165.     print(CORRECT_ANGIE)
  166.     correct += 1
  167. else:
  168.     print(WRONG_ANGIE + "Natus Vincere also known as NaVi.")
  169.     print(POINTS_WRONG)
  170. next(correct, counter)
  171.  
  172.  
  173.  
  174. # 2nd section 'Nomiki' creation
  175. print("~~~~ 2nd section ~~~~")
  176. print("This section will make you search about info on the internet if necessary.")
  177.  
  178. # 2a. Letter 'N' - Ntompriniste
  179. print("**************************************************************************************************")
  180. print("Back in our vacation in Bansko: We selected Razlog and ruled out another one.")
  181. region = input("6) We DID NOT VISIT this region (write 'nt' instead of 'd', there is a reason): ")
  182. counter += 1
  183. regionList = ["ntobriniste", "ntompriniste", "dobriniste", "dompriniste"]
  184. if region.lower() in regionList:
  185.     print(CORRECT_ANGIE)
  186.     print("We didn't visit Dobriniste or Ntombriniste...")
  187.     correct += 1
  188. else:
  189.     print(WRONG_ANGIE + "Dobriniste.")
  190.     print(POINTS_WRONG)
  191. next(correct, counter)
  192.  
  193.  
  194. # 2b. Letter 'O' - October
  195. print("In 11 of which month were we together for 5 months? Please make the right subtraction and reply in english....")
  196. month = input("7) Month: ")
  197. counter += 1
  198. monthList = ["october", "octovrios", "octobrios"]
  199. if month.lower() in monthList:
  200.     print(CORRECT_ANGIE)
  201.     correct += 1
  202. else:
  203.     print(WRONG_ANGIE + "October!")
  204.     print(POINTS_WRONG)
  205. next(correct, counter)
  206.  
  207.  
  208. # 2c. Letter 'M' - 3rd one of the word Limenas
  209. print("**************************************************************************************************")
  210. print("Back in our vacation in Thassos. Write down the 3RD LETTER of the following city.")
  211. letter = input("8) The city, where we were sleeping for 3 nights! LETTER: ")
  212. counter += 1
  213. if letter.lower() == "m":
  214.     print(CORRECT_ANGIE)
  215.     print("'M' is the 3rd letter of word 'Limenas', the city we stayed.")
  216.     correct += 1
  217. else:
  218.     print(WRONG_ANGIE + "M from the word 'Limenas'.")
  219.     print(POINTS_WRONG)
  220. next(correct, counter)
  221.  
  222.  
  223. # 2d. Letter 'I' - From Italy (Eurovision 2021)
  224. print("**************************************************************************************************")
  225. print("Now, I will remind you the Eurovision Song Contest of 2021. Do you remember the")
  226. winner = input("9) winner country: ")
  227. counter += 1
  228. if winner.lower() == "italy":
  229.     print(CORRECT_ANGIE)
  230.     print("Maneskin was great, wasn't it?")
  231.     correct += 1
  232. else:
  233.     print(WRONG_ANGIE + "Italy (Maneskin band)...")
  234.     print(POINTS_WRONG)
  235. next(correct, counter)
  236.  
  237.  
  238. # 2e. Letter 'K' - Kavala
  239. print("**************************************************************************************************")
  240. print("Time for an easy one. Before Thassos, we visited some friends in")
  241. place = input("10) which place: ")
  242. counter += 1
  243. if place.lower() == 'kavala' or place.lower() == 'kabala':
  244.     print(CORRECT_ANGIE)
  245.     correct += 1
  246. else:
  247.     print(WRONG_ANGIE + "Kavala...")
  248.     print(POINTS_WRONG)
  249. next(correct, counter)
  250.  
  251.  
  252. # 2f. Letter 'I' - Iraklis
  253. print("**************************************************************************************************")
  254. print("Thomas' home is near the sports premises and courts of a football team in SKG. Reply in greeklish !!!!")
  255. footballTeam = input("11) Football Team: ")
  256. counter += 1
  257. footballTeamList = ["iraklis", "hraklis", "iraklhs", "hraklhs", "hercules"]
  258. if footballTeam.lower() in footballTeamList:
  259.     print(CORRECT_ANGIE)
  260.     print("This legend leaves near Kaftantzoglio, Ivanofeio and Katsaneio if you wanted to know...")
  261.     correct += 1
  262. else:
  263.     print(WRONG_ANGIE + "Iraklis...")
  264.     print(POINTS_WRONG)
  265. print()
  266. print()
  267. print("If you look closely, the last 6 answers can create an acronym, that Angie loves (or not)...")
  268. print("N - tobriniste")
  269. print("0 - ctober")
  270. print("M")
  271. print("I - taly")
  272. print("K - avala")
  273. print("I - raklis")
  274. next(correct, counter)
  275.  
  276.  
  277.  
  278. # 3rd section
  279. print("~~~~ 3rd section ~~~~")
  280. # 3a. Day born
  281. print("**************************************************************************************************")
  282. print("There are 4 questions in this part. I hope you' ve done well in previous sections!")
  283. print("You can use whatever source you want to find the answer....")
  284. print("What day was Thomas born? I know that even he doesn't remember sometimes. ")
  285. print("But maybe your knowledge about signs may help you.")
  286. day = input("12) Day: ")
  287. counter += 1
  288. if day.lower() == 'monday':
  289.     print(CORRECT_ANGIE)
  290.     print("That was not an easy one. Bravo!")
  291.     correct += 1
  292. else:
  293.     print(WRONG_ANGIE + "Monday...")
  294.     print("Sometimes, I can also be not sure of myself about this one, so don't worry!")
  295.     print(POINTS_WRONG)
  296. next(correct, counter)
  297.  
  298.  
  299. # 3b. How many days have passed
  300. print("**************************************************************************************************")
  301. print("For this question, you have to make a clever calculation yourself or use with an")
  302. print("an APPROPRIATE way the link below. Try the app to see how it works and how it can help you!")
  303. print("!!!! REMEMBER TO FIND A WAY THAT HELPS YOU TO ANSWER THE QUESTION USING THE PROGRAMME !!!!")
  304. print(" ~~~~ LINK ~~~~")
  305. print("https://pastebin.com/E4AeX0pP")
  306. daysPassed = int(input("13) So, today how many days have passed since your born day? "))
  307. counter += 1
  308. if daysPassed == 18986 - 11681:
  309.     print(CORRECT_ANGIE)
  310.     print("This was the most difficult question. I hope you took the 2 outputs of this file and made a subtraction. Nice!")
  311.     correct += 1
  312. else:
  313.     print(WRONG_ANGIE + str(7305) + " days (passed).")
  314.     print("Explanation: In the output of this file, giving a single date you can see how many days have passed since 01 January 1970!")
  315.     print("So, you first put as first search the today's day 25 December 2021 and you find: 18986 days.")
  316.     print("After that, you search about 25 December 2001 and you find: 11681 days.")
  317.     print("Subtraction = 18986 - 11681 = 7305.")
  318.     print(POINTS_WRONG)
  319. next(correct, counter)
  320.  
  321.  
  322. # 3c. Favorite Series
  323. print("**************************************************************************************************")
  324. print("Questions 14 and 15 will be about Thomas' preferences in some things! Let's see what you remember...")
  325. series = input("14) Favorite Thomas' series (only 1): ")
  326. counter += 1
  327. seriesList = ["prison break", "prison", "break"]
  328. if series.lower() in seriesList:
  329.     print(CORRECT_ANGIE)
  330.     print("You have a great memory and care about Thomas!!!!")
  331.     correct += 1
  332. else:
  333.     print(WRONG_ANGIE + " Prison break.")
  334.     print("He has told you that he has watched the whole series about 3-4 times.... No problem though....")
  335.     print(POINTS_WRONG)
  336. next(correct, counter)
  337.  
  338.  
  339. # 3d. Favorite Movie
  340. print("**************************************************************************************************")
  341. film = input("15) Favorite Thomas' film: ")
  342. counter += 1
  343. if film.lower() == "prestige":
  344.     print(CORRECT_ANGIE)
  345.     print("You have a great memory and care about Thomas!!!!")
  346.     correct += 1
  347. else:
  348.     print(WRONG_ANGIE + " Prestige (2006).")
  349.     print("He has told you that he has watched the movie 3 times and some of them he got confused about the final winner.... No problem though....")
  350.     print(POINTS_WRONG)
  351. next(correct, counter)
  352.  
  353.  
  354.  
  355. # 4th section
  356. print("~~~~ 4th section ~~~~")
  357. print("In this last section, you have to be more concentrated! A big surprise is waiting for you after the last 5 questions!")
  358. # 4a. Real Madrid and ....
  359. print("**************************************************************************************************")
  360. print("Thomas favorite team in Spain is Real Madrid. As you know the biggest rival of Real is Barcelona and one more team.")
  361. print("This team won La Liga 2021 and is also from MADRID. Which team is this?")
  362. rival = input("16) Rival of Real: ")
  363. counter += 1
  364. rivalList = ["atletico", "atletico madrid", "atletico de madrid", "club atletico de madrid"]
  365. if rival.lower() in rivalList:
  366.     print(CORRECT_ANGIE)
  367.     correct += 1
  368. else:
  369.     print(WRONG_ANGIE + "Atletico (Madrid).")
  370.     print(POINTS_WRONG)
  371. next(correct, counter)
  372.  
  373.  
  374. # 4b. Nomiki again
  375. print("**************************************************************************************************")
  376. print("After question 11, an acronym created (in greeklish language). Write that down again here.")
  377. acronym = input("17) Acronym: ")
  378. counter += 1
  379. acronymCorrect = "nomiki"
  380. if acronym.lower() == acronymCorrect:
  381.     print(CORRECT_ANGIE)
  382.     correct += 1
  383. else:
  384.     print(WRONG_ANGIE + "Nomiki (go up to confirm this last answer).")
  385.     print(POINTS_WRONG)
  386. next(correct, counter)
  387.  
  388.  
  389. # 4c. Gmail
  390. print("**************************************************************************************************")
  391. print("Thomas has an email as all people have. Write down the company name!")
  392. print("Select one of these answers: hotmail, gmail, outlook, yahoo")
  393. mail = input("18) Type of mail: ")
  394. counter += 1
  395. mailList = ["gmail", "2", "b"]
  396. if mail.lower() in mailList:
  397.     print(CORRECT_ANGIE)
  398.     correct += 1
  399. else:
  400.     print(WRONG_ANGIE + "Gmail.")
  401.     print(POINTS_WRONG)
  402. next(correct, counter)
  403.  
  404.  
  405. # 4d - Imagination
  406. print("**************************************************************************************************")
  407. print("When someone conceives facts that have not happened or can create beautiful stories and write about myths, we say that this man has huge .......")
  408. answer1 = input("19) Answer (in english): ")
  409. counter += 1
  410. answer1Correct = "imagination"
  411. if answer1.lower() == answer1Correct:
  412.     print(CORRECT_ANGIE)
  413.     correct += 1
  414. else:
  415.     print(WRONG_ANGIE + answer1Correct + ".")
  416.     print(POINTS_WRONG)
  417. next(correct, counter)
  418.  
  419.  
  420. # 4e. Eyes
  421. print("**************************************************************************************************")
  422. print("When the sun 'hits' onto my face, you usually say that the color of my .... changes!")
  423. answer2 = input("20) Answer (in english): ")
  424. counter += 1
  425. answer2List = ["eyes", "eye", "mati", "matia"]
  426. if answer2.lower() in answer2List:
  427.     print(CORRECT_ANGIE)
  428.     correct += 1
  429. else:
  430.     print(WRONG_ANGIE + "eyes.")
  431.     print("Don't you remember? You say that they become slightly more green!")
  432.     print(POINTS_WRONG)
  433. next(correct, counter)
  434. print()
  435. print()
  436.  
  437.  
  438. # Final Act of Programme
  439. print("In the last 5 answers there are 2 acronyms hidden!!!! I will give you some time to think about.")
  440. print("When you find the answer or when you are bored to search further, I will give you the answer.")
  441. print("Just press any button or write just a single character in the console....")
  442. print("~~~~", rivalList[0], acronymCorrect, mailList[0], answer1Correct, answer2List[0], "~~~~")
  443. anything = input("Press any key to continue")
  444. yesOrNo = input("Do you want to know what do the acronyms hide behind them? ")
  445. revealTheTruth(rivalList[0], acronymCorrect, mailList[0], answer1Correct, answer2List[0])
  446. eyxes()
  447.  
  448.  
  449.  
  450.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement