If you need the rest of the separation problem, just use the actual remainder rules, as in math. This will not give you decimal output.
valone = 8 valtwo = 3 x = valone / valtwo r = valone - (valtwo * x) print "Answer: %s with a remainder of %s" % (x, r)
If you want to do this in a calculator format, simply replace valone = 8 with valone = int(input("Value One")) . Do the same with valtwo = 3 , but obviously different wairabs.
S. Ahmad Oct 19 '17 at 0:33 2017-10-19 00:33
source share