25 lines
581 B
Python
25 lines
581 B
Python
addition = 1 + 4 + 5
|
|
|
|
print ("1 + 4 + 5 = ", addition)
|
|
|
|
multiply = 5 * 4
|
|
|
|
print ("5 * 4 = ", multiply)
|
|
|
|
leftToRight = 5 + 2 * 10 #Python uses PEMDAS, not basic left to right mathematics
|
|
|
|
print("5 + 2 * 10 = ", leftToRight)
|
|
|
|
remainder = 11 % 3
|
|
quotient = int(11 / 3)
|
|
print("The whole number in a division problem 11 / 3 is :", quotient)
|
|
print("11 % 3 leaves a remainder of : ", remainder)
|
|
|
|
print ("\n", "Using a Double multiply symbol (**) is for exponents.")
|
|
|
|
squared = 7 ** 2
|
|
cubed = 3 ** 3
|
|
|
|
print ("7^2 or seven squared is : ", squared)
|
|
print ("3^3 or three cubed is : ", cubed)
|