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.’)

Hello world!

This is the first post on your Learning Blog. Edit or delete it, then start blogging!

NOTE: Remember to add appropriate Category and Tags to your posts. This will help your professors and other visitors find the content they are looking for. The Category “Coursework” and the Tags “OpenLab” and “City Tech” have already been applied to this post. Feel free to make changes!