Advertisement
_Suraj_

Maths_questions_using_Python

Oct 1st, 2023
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | Source Code | 0 0
  1.  
  2. # Let's check your Maths Knowledge
  3.  
  4. from random import randint
  5. correct =0
  6.  
  7. for _ in range(20):
  8.     a=randint(0,100)
  9.     b=randint(0,100)
  10.     rd= a+b
  11.     print(a,"+",b,"=")
  12.     r = int(input())
  13.    
  14.     if r==rd:
  15.         print('Right Answer👍')
  16.     else:
  17.         print('Worng Answer🥺')  
  18.         correct += 1
  19.        
  20. print("it's over, questions complete.🏅🏅🏅")
  21. print("Happy Coding😅")
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement