score = 0 answer1 = input("Who was the first man in space?") if (answer1 == "Yuri Gagarin") or (answer1 == "yuri gagarin"): print ("Correct") score = score + 1 else: print("Wrong!!!!!!!") score = score - 1 answer2 = input("What was the first satellite called??") if (answer2 == "Sputnik") or (answer2 == "sputnik"): print ("Correct") score = score + 1 else: print("Wrong!!!!!!!") score = score - 1 answer3 = input("Which country was the first to the Moon?") if (answer3 == "USA") or (answer3 == "usa") or (answer3 == "America") or (answer3 == "america"): print ("Correct") score = score + 1 else: print("Wrong!!!!!!!") score = score - 1 answer4 = input("Who was the first man on the moon?") if (answer4 == "Neil Armstrong") or (answer4 == "neil armstrong"): print ("Correct") score = score + 1 else: print("Wrong!!!!!!!") score = score - 1 answer5 = input("what is the first man made object to leave the solar system?") if (answer5 == "Voyager 1") or (answer5 == "voyager 1"): print ("Correct") score = score + 1 else: print("Wrong!!!!!!!") score = score - 1 print ("your score is") print (score) if score == 5: print ("WOW!!!!!!!!!!!!!!") if score == 4: print ("So close, yet so far!") if score == 3: print ("Almost!") if score == 2: print ("Good effort") if score == 1: print ("Better luck next time") if score == 0: print ("hmmmmm") if score == -1: print ("Try harder") if score == -2: print ("Oh dear") if score == -3: print ("Google it") if score == -4: print ("You need to research") if score == -5: print ("...")
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