Lab 3

It was kinda difficult, i still missing the loop for option number 7 to exit the program. but i did the rest.


print (‘ Menu ‘)
print (”)
print (‘1) Sum numbers’)
print (‘2) Subtract numbers’)
print (‘3) Multiply Numbers’)
print (‘4) Divide numbers’)
print (‘5) Reminder of the numbers’)
print (‘6) Compare numbers’)
print (‘7) EXIT’)
while(e != 7):
e = input(‘ choose the number of the option that your trying to use: ‘)
e = int(e)
x = input (‘ enter x number:’)
y = input (‘enter y number :’)
x = int(x)
y = int(y)
if e == 1:
print(‘x added by y is equals to:’,x+y)
elif e == 2:
print(‘x subtrate by y is equals to:’, x – y)
elif e == 3:
print(‘x multiply by y is equals to:’, x*y)
elif e == 4:
print(‘x divided by y is equals to:’, x/y)
elif e == 5:
print(‘Your reminder is:’,x%y)

elif e== 6:
if x>y:
print(‘x is greater than y’)
elif x<y:
print(‘x is less than y’)
elif x==y:
print(‘they are equal in values’)

Leave a Reply

Your email address will not be published. Required fields are marked *