Advertisement
KodingKid

How to make a maths exam in Python

May 15th, 2021
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. correct = 0
  2. incorrect = 0
  3. q1 = input()
  4. print("Does 2+2=4?")
  5. if q1 = "Yes" or "yes":
  6.     correct + 1
  7. if else:
  8.     incorrect + 1
  9. q2 = input()
  10. print("Does 38+19=59?")
  11. if q2 = "No" or "no":
  12.     correct + 1
  13. if else:
  14.     incorrect + 1
  15. q3 = input()
  16. print("Does 93x129=11997?")
  17. if q3 = "Yes" or "yes":
  18.     correct + 1
  19. if else:
  20.     incorrect + 1
  21. q4 = input()
  22. print("Does -1-1=0?")
  23. if q4 = "No" or "no":
  24.     correct + 1
  25. if else:
  26.     incorrect + 1
  27. q5 = input()
  28. print("Does 1/4+1/2=3/4?")
  29. if q5 = "Yes" or "yes":
  30.     correct + 1
  31. if else:
  32.     incorrect + 1
  33. break
  34. if (correct > incorrect):
  35.     print("You passed the test!")
  36. if else:
  37.     print("You failed the test...")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement