blob: 6df82bea5726281df35c2d66049322dd9f042a67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env python
print("""
Program author: mo khan
ID: 3431709
PROGRAM 1-MATH FUNCTIONS
""")
# Add two numbers and print the result
print('ADDITION: 2+2={}'.format(2+2))
# Subject one number from another and print the result
print('SUBTRACTION: 4-2={}'.format(4-2))
# Multiple two numbers and print the result
print('MULTIPLICATION: 4*2={}'.format(4*2))
# Divide one number from another and print the result
print('DIVISION: 4/2={}'.format(4/2))
# Compute the exponent and print the result
print('EXPONENT: 2**3={}'.format(2**3))
# Compute the remainder using modulus division and print the result
print('REMAINDER: 5%2={}'.format(5%2))
|