''' Bastian's Quiz ''' #link: /home/unny/Projects/Bastians_tests/quiz.py score=0 print ("Bastians Amazing QUIZ of the World") start = input("Are you ready to start Y/N: ") if start == "Y": #while(loopforquestion1 == 0): print ("Question 1: ") print ("What is the largest animal on Earth?") answerforquestion1 = input("A = Giraffe, \nB = Elefant, \nC = Blue Whale. \nAnswer: ") if answerforquestion1 == "A": print ("Wrong, It is the Blue Whale.") #loopforquestion1 += 1 if answerforquestion1 == "B": print ("Wrong, It is the Blue Whale.") #loopforquestion1 += 1 if answerforquestion1 == "C": print ("Correct!") score += 1 #loopforquestion1 += 1 #else: #print ("That was Not an Answer.") print ("Question 2: ") print ("Who launched the Rocket Apollo 11?") answerforquestion2 = input("A = ESA, \nB = NASA, \nC = USSR. \nAnswer: ") if answerforquestion2 == "A": print ("Wrong, It was NASA.") if answerforquestion2 == "B": print ("Correct!") score += 1 if answerforquestion2 == "C": print ("Wrong, It was NASA.") #else: #print ("That was Not an Answer.") print ("Question 3: ") print ("How did President John F. Kennedy Die?") answerforquestion3 = input("A = He was shot, \nB = He died of old age, \nC = He got Swine Flu and died from it. \nAnswer: ") if answerforquestion3 == "A": print ("Correct!") score += 1 if answerforquestion3 == "B": print ("Wrong, He was shot.") if answerforquestion3 == "C": print ("Wrong, He was shot.") #else: #print ("That was Not an Answer.") print ("Question 4: ") print ("Who discovered the law of gravity?") answerforquestion4 = input("A = Albert Einstein, \nB = Isaac Newton, \nC = Galileo. \nAnswer: ") if answerforquestion4 == "A": print ("Wrong, It was Isaac Newton.") if answerforquestion4 == "B": print ("Correct!") score += 1 if answerforquestion4 == "C": print ("Wrong, It was Isaac Newton.") #else: #print ("That was Not an Answer.") print ("Question 5: ") print ("From which country did LEGO® come from?") answerforquestion5 = input("A = Denmark, \nB = UK, \nC = Switzerland. \nAnswer: ") if answerforquestion5 == "A": print ("Correct!") score += 1 if answerforquestion5 == "B": print ("Wrong, Denmark made LEGO®.") if answerforquestion5 == "C": print ("Wrong, Denmark made LEGO®.") #else: #print ("That was Not an Answer.") print ("Question 6: ") print ("What is the lowest note for a Guitar?") answerforquestion6 = input("A = D string, \nB = B string, \nC = E string. \nAnswer: ") if answerforquestion6 == "A": print ("Wrong, It is the E string.") if answerforquestion6 == "B": print ("Wrong, It is the E string.") if answerforquestion6 == "C": print ("Correct!") score += 1 #else: #print ("That was Not an Answer.") print ("Question 7: ") print ("Who wrote 'The Ugly Duckling'?") answerforquestion7 = input("A = The Grimm Brothers, \nB = HC Andersen, \nC = Lewis Carrol. \nAnswer: ") if answerforquestion7 == "A": print ("Wrong, It was HC Andersen.") if answerforquestion7 == "B": print ("Correct!") score += 1 if answerforquestion7 == "C": print ("Wrong, It was HC Andersen.") #else: #print ("That was Not an Answer.") #print ("That was Not an Answer.") print ("Your Score is: ") print (score) if score == 12: print ("You reached the world Record!!!!!!!") else: print ("You didn't make it to the world record. Try again.") if start == "N": print ("OK, you are not ready.")
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question