Lab2

Lab 1

Lab1

Description:

This is lab #2

Python Flow of control

Code:

x = input (“Enter x: “)
y = input (“Enter y: “)
print x+y

print x-y

print x*y

print x/y

print x%y

if x == y :
print ‘x is equal to y’
elif x < y:
print ‘x is less than y’
else :
print ‘x is greater than y’
while 1:
x = input (“Enter x: “)
y = input (“Enter y: “)

if x == ‘0’ : break
if y == ‘0’ : break

 

screenshot:

Lab#2 lab#2(1) lab#2(2) lab#2(3)

 

Leave a Reply

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