Code:
while True: a_str = raw_input("Please enter a number: ") #user typed input for a b_str = raw_input("Please enter a 2nd number: ") #user typed input for b a = int(a_str) #value of a b = int(b_str) #value of b #THIS IS THE PROCESSING STAGE if a==0: print "program end" break elif b==0: print "Program end" break else: my_sum = a + b my_difference = a - b my_product = a * b my_quotient = a / b my_remainder = a % b #THIS IS THE OUTPUT STAGE print "The sum of both numbers is: ", my_sum print "The difference of both numbers is: ", my_difference print "The product of both numbers is: ", my_product print "The quotient of both numbers is: ", my_quotient print "The remainder of both numbers is: ", my_remainder if a>b : print "The first value is greather than the second" + '\n' elif a<b : print"The second value is greather than the first" + '\n' else: print "Both values are the same" + '\n'