Skip to content

Instantly share code, notes, and snippets.

@Erisa
Created October 12, 2017 10:53
Show Gist options
  • Save Erisa/69eb1108436a619cf1cca4ff09bc483f to your computer and use it in GitHub Desktop.
Save Erisa/69eb1108436a619cf1cca4ff09bc483f to your computer and use it in GitHub Desktop.
print("-=-=-=-=-=-=-=-=-=-=-")
print("= Welcome to quiz!! =")
print("-=-=-=-=-=-=-=-=-=-=-")
print()
score = 0
question = 1
print("[- Question 1 -]")
print("Q -- Into which sea does the Nile flow?")
print("A: Amundsen")
print("B: Pacific")
print("C: Mediterranean")
print("D: None")
answer = input(">>> ")
print("The correct answer is: C: Mediterranean")
if answer.upper() == "MEDITERRANEAN" or answer.upper() == "C" or answer.upper() == "MEDITERRANEAN SEA":
print("You got it right!")
score += 1
print("Current score: ", score, "/", question)
else:
print("You got this one wrong! Better luck next time...")
print("Current score: ", score, "/", question)
question += 1
print()
print("[- Question 2 -]")
print("Q -- In American currency 10 cents make a what?")
answer = input(">>> ")
print("The correct answer is: Dime")
if answer.upper() == "DIME":
print("You got it right!")
score += 1
print("Current score: ", score, "/", question)
else:
print("You got this one wrong! Better luck next time...")
print("Current score: ", score, "/", question)
question += 1
print()
print("[- Question 3 -]")
print("Q -- What is: (3 * 6) / 3")
answer = input(">>> ")
print("The correct answer is: 6")
if answer == "6":
print("You got it right!")
score += 1
print("Current score: ", score, "/", question)
else:
print("You got this one wrong! Better luck next time...")
print("Current score: ", score, "/", question)
question += 1
print()
print("[- Question 4 -]")
print("Q -- What is the common name of the' Auora Borealis'?")
answer = input(">>> ")
print("The correct answer is: Northen Lights")
if answer.upper() == "NORTHEN LIGHTS":
print("You got it right!")
score += 1
print("Current score: ", score, "/", question)
else:
print("You got this one wrong! Better luck next time...")
print("Current score: ", score, "/", question)
print()
question += 1
print("[- Question 5 -]")
print("Q -- How many questions have there been so far, excluding this one?")
print("A: 1")
print("B: 4")
print("C: 5")
print("D: 10")
answer = input(">>> ")
print("The correct answer is: B: 4")
if answer == "4" or answer.upper() == "B":
print("You got it right!")
score += 1
print("Current score: ", score, "/", question)
else:
print("You got this one wrong! Better luck next time...")
print("Current score: ", score, "/", question)
print()
print("-=-=-=-=-=-=-=-=-=-=-")
print("= End of quiz!! =")
print("-=-=-=-=-=-=-=-=-=-=-")
print()
print("=-=-= Results =-=-=")
print("Score: ", score, "/", question)
print("Percent correct: ", (score / question) * 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment