Description:

In this program Im communicating with the user.Its like telling the user how to do something; not to do something but to enter what information the program need to calculate the answer that the user needs.is asking you to enter something then calculate it.

code :

x = int(input (‘please enter a value for x ? \n ‘ ) )

y= int(input (‘please enter a value for y? \n ‘ ) )

x = int (x)

y = int (y)

while x != 0 and y != 0:

print (x+y)
print (x-y)
print(x*y)
print(x/y)
print(x%y)
if x < y:
print (‘x is less than y’)
elif x > y:
print(‘y is less than x’)
else:
print(‘x is equal to y’)
x=int(input ( ‘ please enter a value for x?\n’))

y=int(input ( ‘ please enter a value for y?\n’))
print

 

screenshot:

Lap2