Lab 2

Code for Lab 2

inputStr = raw_input(‘Please enter a number: ‘)
inputInt1 = int(inputStr)

inputStr = raw_input(‘Please enter another number: ‘)
inputInt2 = int(inputStr)

print ‘The sum of’,inputInt1, ‘and’,inputInt2, ‘is:’,inputInt1+inputInt2
print ‘The difference of’,inputInt1, ‘and’,inputInt2, ‘is:’,inputInt1-inputInt2
print ‘The product of’,inputInt1, ‘and’,inputInt2, ‘is:’,inputInt1*inputInt2
print ‘The quotient of’,inputInt1, ‘and’,inputInt2, ‘is:’,inputInt1/inputInt2, ‘with remainder:’,inputInt1%inputInt2