lab 3

Lab description:

This  program is more complex than the previous one.I believe that the program from second lab is somehow integrated in  this lab. First ,implements defined functions.Second, shows a menu (the easiest part) and asks for a choice. And last part creates a loop to restart the program.

Code:


# define functions
def sum_numbers():
    x= int(input ("enter intger x value:"))
    y= int(input ("enter integer y value:"))
    print ("x+y= ",(x+y))
def subtract_numbers():
    x= int(input ("enter intger x value:"))
    y= int(input ("enter integer y value:"))
    print ("x-y= ",(x-y))
def multiply_numbers():
    x= int(input ("enter intger x value:"))
    y= int(input ("enter integer y value:"))
    print ("x*y= ",(x*y))
def divide_numbers():
    x= int(input ("enter intger x value:"))
    y= int(input ("enter integer y value:"))
    print ("x/y= ",(x/y))
def remainder():
    x= int(input ("enter intger x value:"))
    y= int(input ("enter integer y value:"))
    if x==0 or y==0:
        print ("calculation nat possible")
    else:
        print ("x%y= ",(x%y))
def compare():
    x= int(input ("enter intger x value:"))
    y= int(input ("enter integer y value:"))

    if (x>y):
        print('x is greater than y')
    elif x

Screenshoot: