how would i add random operators to this? also how would i do another question lIke this?
import random
def main():
print ("This program prints 2 random number from 1,10")
num1 = random.randint(1,10)
num2 = random.randint(1,10)
total = (num1 + num2)
print (num1, "\n","+","\n",num2)
ans = int(input("enter answer"))
if total == ans:
print ("correct")
else:
print ("wrong")
def sum(num1,num2):
return num1 + num2