Lucas Lucas - 1 year ago 98
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 % num2 == num3)
print (int(num3))

print("your characters atrributes are",num3+10,)

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
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 Source

Just assign it to a new variable

num3 = num1 % num2
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download