pythonnewbee

Untitled

Jan 14th, 2021
484
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. score = 0
  2.     print("********************************************************")
  3.     print("Welcome to the Maths Quiz")
  4.     print("Can you answer three questions and score maximum points?")
  5.     print("********************************************************")
  6.     print("\nQuestion 1: What is the product of 2x2x2?")
  7.  
  8.     answer = int(input("Your answer :>> "))
  9.  
  10.     if answer == 8:
  11.         print("Correct")
  12.         score = score + 1
  13.         #highscore = highscore + score
  14.         #print("Your score is", score)
  15.     else:
  16.         print("Incorrect, the answer is 8")
  17.         print("Your score is", score)
  18.  
  19.     if score > highscore:
  20.         highscore = highscore + score
  21.     print("The high score is", highscore)
RAW Paste Data