Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randrange
- from timeit import default_timer as timer
- # Function 1
- def cont(ANSWER):
- flag = True
- if ANSWER.lower() == "yes" or ANSWER.lower() == "sure" or ANSWER.lower() == "of course" or ANSWER.lower() == "why not" or ANSWER.lower() == "yeah":
- flag = True
- elif ANSWER.lower() == "no" or ANSWER.lower() == "no way":
- flag = False
- print("Don't be so negative! I think we have to continue")
- else:
- print("You didn't answer with 'yes' or 'no'. It's a game, so I will translate it as a big 'yes'.")
- flag = False
- if flag == True:
- r = randrange(3)
- if r == 0:
- print("Perfect, we continue!")
- elif r == 1:
- print("Nice, let's continue!")
- else:
- print("Great, we keep going!")
- else:
- print("So, we continue and you will not regret it, I promise!")
- # Function 2
- def convert(seconds):
- seconds = int(seconds)
- minutes = int(seconds / 60)
- secs = seconds - minutes * 60
- return minutes, secs
- # MAIN FUNCTION
- START = timer()
- print()
- print("Merry Christmas dear user! This is a programme to make you smile in your birthday.")
- print("It has been designed with much thought and many details, I hope you like it.")
- print("Let's focus in the programme. You will use a lot the console in order to gve me input-answers.")
- print("Sometimes, the programme will ask you if you want to continue. OF COURSE YOU HAVE")
- print("TO REPLY GENTLY giving answers like 'yes', 'sure', 'of course'. Programme needs feedback")
- print("to work properly. Also, if you are lucky, the programme may give you some predictions")
- print("about the new year 2021. Take it easy and enjoy, it will take 5 mins to be completed.")
- print("So, lets start to entertain you.")
- print()
- name = input("Write your full name here: ")
- print("Hmmmm nice, I found you in Facebook. I will send you a friend request!")
- print()
- print("Hello '" + str(name) + "'. I hope you are very good and glad today!")
- print("We also know that your first thought after reading the above message maybe was that this 'part' was pretty easy")
- print("for you to design it on your own. Real developers understand each other. Let's continue!")
- ANSWER = input("Continue? ")
- print()
- cont(ANSWER)
- print()
- # Variables Space
- hits = 0
- tries = 0
- hits1 = 0
- percentage1 = 0
- # SECTION 1
- # PART 1
- print("****************************************************************************************")
- print("******************************* SECTION 1 **********************************************")
- print("****************************************************************************************")
- print()
- print("* 1a. In your life, you have to smile. Remember that smiling is not the opposite of sadness")
- print("Daniel Sloss told it years agooo. What do you want from life? What anyone needs?")
- print()
- answer = ""
- need = input(str(name) + ": I just wanna be: ")
- tries += 1
- if need.lower() == "happy":
- print("Niiice. Programme thought that happiness is the secret for you dear user. 1/1 correct answers")
- hits1 += 1
- hits += 1
- else:
- print("Hmmmmm " + str(answer) +".... Good choice. But the programme guessed that you would say 'happy'! We will continue with this answer.")
- answer += "Happy"
- print("Answer: " + str(answer))
- print()
- ANSWER = input("Continue? ")
- cont(ANSWER)
- # PART 2
- print()
- print("* 1b. Here you have to write down a 2-digit NUMBER. You can think about your answer with 2 ways.")
- print("The number we want for input is the HALF of the favourite number of the guy who wrote this code.")
- print("If you cannot remember this, I can remind you that you wrote 18.962. Too close to 19K (yposyneidhto)")
- number = int(input("Write down the number we are looking for: "))
- tries += 1
- if number == 19:
- print("I was so sure you had a great memory. It was so clear in the cube-IQ-test! (Code creator laughing)")
- hits1 += 1
- hits += 1
- elif number == 38:
- print("38 is the favourite number of the code creator, but we wanted the HALF.")
- print("But, I will give you the point, beacuse you have a great memory. Next time, be more careful hahahaha")
- hits1 += 1
- hits += 1
- else:
- print("I hope you miss-clicked. You had 2 evidences to write 19. But don't be sad, its a game!")
- print("Life needs SMILE! Try to be more careful in next questions.")
- answer += " 19 "
- print("Answer: " + str(answer))
- print()
- ANSWER = input("Continue? ")
- cont(ANSWER)
- # PART 3
- print()
- print("* 1c. Last question for section 1. You are 'gata', so maybe you expect something after '19' in answer.")
- print("It's time for lexarithms in English. Try to decode the following message.")
- print("This one more tricky/difficult from above, you have to think a little bit more...")
- print("I want you to write a word after the ciphered message. Don't care about captital letters.")
- print("The programmer is too experienced to overcome these problems.")
- lexarithm = input("Ciphered message = '1 - 14 - 7 - 9 - 5' ----> Decoded message: ")
- tries += 1
- print()
- if lexarithm.lower() == "angie":
- print("One more correct answer. I expected that from you")
- hits1 += 1
- hits += 1
- else:
- print("Hmmmm. You have to focus more. You are so clever, you can do it. The correct answer was 'Angie'.")
- print("Maybe, you had entered this name back in the 1st input.")
- answer += "Angie"
- print("Answer: " + str(answer))
- ANSWER = input("Continue? ")
- cont(ANSWER)
- # PART 4
- print()
- print("One more liiiitle step. Enter a number from 6(inclusive) to 10(inclusive). No much thought required!")
- thaym = int(input("Number from 6 to 10: "))
- while thaym < 6 or thaym > 10:
- thaym = int(input("Number from 6 to 10: "))
- print("You selected " + str(thaym) + ". So, i will put " + str(thaym) + " exclamation marks in answer.")
- end = " "
- for i in range(thaym):
- end += "!"
- answer += end
- print("Answer: " + str(answer))
- print()
- # END 1 - STATISTICS
- print("Section 1 has ended. You found " + str(hits1) + " / 3 correct answers. That is amazing. Keep going!" )
- ANSWER = input("Continue? ")
- cont(ANSWER)
- print()
- print()
- # SECTION 2
- print("****************************************************************************************")
- print("******************************* SECTION 2 **********************************************")
- print("****************************************************************************************")
- print()
- print("2. Programme asks you to write down 3 inputs. You have to mention the 3 characteristics ")
- print("of your personality. We want 3 aspects of yourself, the 3 that you thought first!")
- print("This one is more difficult, but we think we can find some....")
- print()
- char1 = input("Write down the 1st personality characteristic that you thought: ")
- char2 = input("Write down the 2nd personality characteristic that you thought: ")
- char3 = input("Write down the 3rd personality characteristic that you thought: ")
- print()
- characteristics = ["clever", "intelligent", "emotional", "sensitive", "sweet"]
- hits2 = 0
- chars = [char1, char2, char3]
- hits2List = []
- for char in chars:
- for characteristic in characteristics:
- if char == characteristic:
- hits2 += 1
- hits2List.append(char)
- hits += 1
- tries += 3
- print("Niiiice! You found " + str(hits2) + " / 3. My list contained these items: ")
- print(characteristics)
- print("I know that there are 5 characteristics, but the chars 1-2 and 3-4 are the same!")
- print("Points: " + str(hits) + " / " + str(tries))
- print()
- # SECTION 3
- print("****************************************************************************************")
- print("******************************* SECTION 3 **********************************************")
- print("****************************************************************************************")
- print()
- print("3. Now, that you are used to the programme's style, it will be easier to keep going!")
- print("This will be a quiz with easy math questions and I want to write down the results/numbers.")
- print("I will count how much time did you take to complete the following 3 questions!!!!")
- print()
- ANSWER = input("Continue? ")
- cont(ANSWER)
- print()
- start1 = timer()
- n1 = int(input("3a) 25 * 8 = "))
- end1 = timer()
- secs1 = end1 - start1
- start2 = timer()
- n2 = int(input("3b) If the 1st prime number is 2, then the 5th prime is: "))
- end2 = timer()
- secs2 = end2 - start2
- start3 = timer()
- n3 = int(input("3c) 15 ^ 2 = "))
- end3 = timer()
- secs3 = end3 - start3
- tries += 3
- print("Let's see how many correct answers you gave me!")
- hits3 = 0
- if n1 == 200:
- print("25 * 8 = 200 ----> You are right!")
- hits3 += 1
- hits += 1
- else:
- print("In 1st question, you gave me " + str(n1) + ", but: ")
- print("25 * 8 = 200 ----> You are right!")
- if n2 == 11:
- print("The 5th prime is 11 ----> You are right!")
- hits3 += 1
- hits += 1
- else:
- print("In 2nd question, you gave me " + str(n2) + ", but: ")
- print("The 5th prime is 11")
- if n3 == 225:
- print("15 ^ 2 = 225 ----> You are right!")
- hits3 += 1
- hits += 1
- else:
- print("In 3rd question, you gave me " + str(n3) + ", but: ")
- print("15 ^ 2 = 225")
- print("Fantastic! You found " + str(hits3) + " / 3 correct here.")
- elapsed = secs1 + secs2 + secs3
- elapsed = round(elapsed, 2)
- print("You answered in " + str(elapsed) + " seconds! Very satisfying!")
- ANSWER = input("Continue? ")
- print()
- cont(ANSWER)
- print()
- print("But, the programmer has one more little surprise for you in section 3 of the programme!")
- print("You have seen the 3 correct answers. Please 'connect' them to create a 8-digit number with the given row")
- date = int(input("If you put all the answers together, what's the created number? "))
- tries += 1
- if date == 20011225:
- hits += 1
- print("Exactly! One more correct answer in your 'bag'!")
- else:
- print("I hope you miss-clicked, because you had all the 3 numbers I wanted to concatenate")
- print("The correct answer is: 20011225")
- print()
- print("So, now im pretty sure that if you focus carefully (Prestige's dialogue was 'look closely'),")
- print("you will notice that this number means something for you!")
- birth = input("What does this number mean for you? Write 1 single word without referring 'my': ")
- tries += 1
- if birth.lower() == "birthday":
- hits += 1
- print("Yeahhhh! I was sure you are pretty keen on understanding patterns in the numbers!")
- else:
- print("20011225 ----> 2001 / 12 / 25 ----> It's your birthday! That was the correct answer!")
- print("Nice try though...")
- print()
- print("Points: " + str(hits) + " / " + str(tries))
- print()
- print("And, now we move on to the last section!!!!")
- print()
- print()
- # SECTION 4
- print("****************************************************************************************")
- print("******************************* SECTION 4 **********************************************")
- print("****************************************************************************************")
- print()
- print("4a. Now, I want you to write down your favorite colour: ")
- colour = input("Favourite color: ")
- tries += 1
- if colour.lower() == "green":
- hits += 1
- print("Nice. I was sure enough that I remembered this one correctly")
- else:
- print("OHHHHHH. I thought that green was your favorite colour!")
- print("I am sorry, now I will remember this forever.....")
- print("But, let's continue with 'green' our test. Of course, you will receive the point,")
- print("because that was my mistake")
- hits += 1
- print()
- print("4b. Back to lexarithms. I want to give me the lexarithm (data type = number) of word 'green'!")
- lex = int(input("Lexarithm = "))
- tries += 1
- if lex == 49:
- hits += 1
- print("Nice, lexarithm is 49. I am impressed of your 'adding' abilities hahahaha....")
- else:
- print(str(lex) + " is not the correct answer. 49 was the correct one")
- ANSWER = input("Continue? ")
- print()
- cont(ANSWER)
- print()
- print("4c. So, now we know that our number is 49. Let's name this number as 'n' ----> n = 49")
- print("Calculate the following calculation!")
- calc = int(input("square_root(n) * 17 = "))
- tries += 1
- if calc == 119:
- hits += 1
- print("Nice multiplication! Remember that number")
- else:
- print("You could use a computer to calculate: sqrt(49) * 17 = 7 * 17 = 119")
- ANSWER = input("Continue? ")
- print()
- cont(ANSWER)
- print()
- print("If, you have made the multiplication correctly, you have a pretty familiar number for you!")
- print("I am sure you gave money to find out that number 2 nights before!")
- print("I am also sure that maybe you thought about it before the above message, but it doesn't matter.")
- print("I want you to write down a single word or 2 words ('KOLLHTA OMWS XWRIS KENA') to tell me what")
- print("this number reminded you")
- iq = input("4d. What does this remind you " + str(name) + "? ")
- tries += 1
- print()
- if iq.lower() == "iq" or iq.lower() == "iqtest" or iq.lower() == "testiq" or iq.lower() == "iq-test" or iq.lower() == "test-iq":
- hits += 1
- print("I knew that you would find out this one quickly")
- print("EDW EKANES 16/20 STOUS PALIOKYBOUS EDW THA KOLLAGES ?!?!?!?!")
- else:
- print("I think that you wanted to say something about IQ, but I can't count it as correct answer....")
- print()
- print("Now, it's time for the last question of the test! You have made it fantastic so far!")
- print("Let's go back to the beautiful prime numbers. The 1st prime is 2, the 2nd is 3, the 3rd is 5 etc....")
- print("Let's call: a = the 14-th prime and b = the 15-th prime")
- print("I want you to multiplicate them and write down the result! Confirm it with your phone for being 100% sure!")
- mult = int(input("a * b = "))
- print()
- tries += 1
- if mult == 2021:
- hits += 1
- print("CORRECT AGAIN AND YOU KNOW WHAT I'M GONNA SAY!")
- else:
- print("Prime[14] = 43 and Prime[15] = 47, so their product is 43 * 47 = 2021")
- print("Now, you see how powerful are the numbers! Who could thought that the only divisors")
- print("of the 'new year' are these 2 prime numbers? 43 and 47 seem very strange, but you have")
- print("to realise that the beauty and magic things in the nature hide some nice secrets about primes.")
- print("If you search more on web, you will 'fall out from the clouds'! HAHAHAHA")
- ANSWER = input("Continue? ")
- print()
- cont(ANSWER)
- print()
- print("Your final score is: ")
- print("Points: " + str(hits) + " / " + str(tries))
- perc = hits / tries
- perc = 100 * perc
- perc = round(perc, 2)
- print("Correct answer percentage: " + str(perc) + "%")
- print("One last message from the code creator!!!!")
- ANSWER = input("Continue? ")
- print()
- cont(ANSWER)
- print()
- END = timer()
- seconds = END - START
- minutes, secs = convert(seconds)
- print("You 'wasted' " + str(minutes) + " minutes and " + str(secs) + " seconds from your life to take this quiz!")
- print("I thank you a lot for your time and I hope to make your day happier and entertaining!")
- print("I also hope the new year 2021 will be VERY GOOD and BRING YOU WHATEVER you want.")
- print("From happiness to successes in every part of your life! I hope you the best")
- print("and happy birthday again little '" + str(name) + "' !!!!")
- print("I will let you with a song. Copy and paste the link in YouTube! See you and happy birtday again!")
- link = "https://www.youtube.com/watch?v=qCJSNMqub8g"
- print("Link: " + link)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement