Advertisement
Guest User

PythonCode

a guest
Nov 22nd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. Score = 0
  2. Difficulty = input("Please select a difficulty: ")
  3.  
  4. if Difficulty == "Easy":
  5.     text_file = open("mathsquestionseasy.txt", "r")
  6.     Q1 = input(text_file.readline())
  7.     A1 = text_file.readline()
  8.     A2 = text_file.readline()
  9.     A3 = text_file.readline()
  10.  
  11.     if Q1 == A1:
  12.         print("Well Done!")
  13.     Score += 1
  14.  
  15.     if Q1 == A2:
  16.      print("Well Done!")
  17.     Score += 1
  18.  
  19.     if Q1 == A3:
  20.      print("Well Done!")
  21.     Score += 1
  22.  
  23. else:
  24.     print("Wrong")
  25.  
  26. print(Score)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement