Advertisement
code3212321

Untitled

Nov 30th, 2022 (edited)
999
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. def main():
  2.     level = get_level()
  3.     score = 0
  4.  
  5.     ... populate problems with string "X + Y =" ...
  6.  
  7.     for question in problems:
  8.         incorrect = 0
  9.         while incorrect <= 2:
  10.             if input(question[0]) == str(question[1]):
  11.                 score += 1
  12.                 break
  13.             else:
  14.                 print("EEE")
  15.                 incorrect += 1
  16.         if incorrect == 3:
  17.             print(question[0] + str(question[1]))
  18.  
  19.     print("Score:", score)
  20.     return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement