lab 3

9this lab was like the same as the lab 2 but with more funtions

x1 = “1-Sum numbers”
x2 = “2-Substract numbers”
x3 = “3-Multiply numbers”
x4 = “4-Divide numbers”
x5 = “5-Remainder of numbers”
x6 = “6-Compare numbers”
x7 = “7-Exit”

 

print x1
print x2
print x3
print x4
print x5
print x6
print x7

 

input(“please make a choice:”)

 

x=input(“please enter a number:”)
y=input(“please enter a number:”)

 

while x!=0 or y!=0:
print “The sum of the first number and the second number is”,x+y
print “The difference of the first number and the second number is”,x-y
print “The product of the first number and the second number is”,x*y
print “The quotient of the first number and the second number is”,x/y
print “The remainder of the first number and the second number is”,x%y

 

x = input(“please enter the first number:”)
y = input(“please enter the second number:”)

 

Leave a Reply

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