In Lab 3 we had to re do lab 2 this time we added a exit function at the end. It was good practice. These are my results and codes.

 

Here is my code
import math

x = input(‘Please enter a value for x:’)
y = input(‘Please enter a value for y:’)

result = x+y

print(‘ The sum of ‘,x,’ and ‘,y,’ is ‘,result)

x = input(‘Please enter a value for x:’)
y = input(‘Please enter a value for y:’)

result = x-y

print(‘The difference of ‘,x,’ and ‘,y,’ is ‘,result)

x = input(‘Please enter a value for x:’)
y = input(‘Please enter a value for y:’)

result = x*y

print(‘The product of ‘,x,’ and ‘,y,’ is ‘,result)

x = input(‘Please enter a value for x:’)
y = input(‘Please enter a value for y:’)

result = x/y

print(‘The quotient of ‘,x,’ and ‘,y,’ is ‘,result)

x = input(‘Please enter a value for x:’)
y = input(‘Please enter a value for y:’)

result = x%y

print(‘The reminder of ‘,x,’ and ‘,y,’ is ‘,result)

x = input(‘Please enter a value for x:’)
y = input(‘Please enter a value for y:’)

result = x<y

print(‘,’,x,’ is greater than or less than ‘,y,)

x=1
while  x==1:
print(‘ Finished’)
print(‘ Do you want to continue? (Please enter 1 to continue)’)
x = input(‘Do you wish to continue?:’)
print (‘ Good bye.’)