-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexercize1.py
22 lines (16 loc) · 904 Bytes
/
exercize1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
__author__ = 'patrickh'
first_number = int(raw_input("Enter the first number: "))
while first_number == 0:
first_number = int(raw_input('You must enter a non-zero number:'))
second_number = int(raw_input("Enter the second number: "))
while second_number == 0:
second_number = int(raw_input('You must enter a non-zero number:'))
sum_number = first_number + second_number
difference = first_number - second_number
product = first_number * second_number
quotient = first_number/second_number
remainder = first_number % second_number
print "The sum of %s and %s is: %s" % (first_number, second_number, sum_number)
print "The difference of %s and %s is: %s" % (first_number, second_number, difference)
print "The product of %s and %s is: %s" % (first_number, second_number, product)
print "The quotient of %s and %s is: %s with remainder %s" % (first_number, second_number, quotient, remainder)