Lucas Lucas - 1 month ago 5
Python Question

how to divide two integers stored in variables then store the answer in an variable

from __future__ import division
import random,time
done = False
while not done:

num1=random.randint(1,12)
num2=random.randint(1,4)
(num1 % num2 == num3)
print (int(num3))

time.sleep(0.5)
print("your characters atrributes are",num3+10,)
time.sleep(0.5)

print("Would you like to quit? Y/N or y/n")
restart = input(">>>")
if restart == "Y" or restart == "y":
done = True
elif restart == "N" or restart == "n":
done = False
else:
print("invaild the program will now terminate.")
done = True


this is my code but i dont know how to store the result of (num1 % num2) into a variable called num 3 plz help me

Answer

Just assign it to a new variable

num3 = num1 % num2