Lab 2

Description Lab Report 2

Code:

i = 1
while i > 0:
Item1 = int (input(“Enter a number “))
Item2 = int (input(“Enter a second number “))
if Item1 == 0 or Item2 == 0:
print (“Finished”)
i = 0
else:
print (Item1 + Item2)
print (Item1 – Item2)
print (Item1 * Item2)
print (Item1 / Item2)
print (Item1 % Item2)
if Item1 == Item2:
print (Item1, “is equal to “, Item2)
else:
if Item1 > Item2:
print (Item1, “is greater than ,”, Item2)
else:
print (Item1, “is less than ,”, Item2)
i = 1

Screenshot

lab 2 part 1

Leave a Reply

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