Numerical Operators in Python
# Python From Zero To One (Part 3)
Day 24 of experimenting with video content (now in a series)
Day 24 of experimenting with video content (now in a series)
# addition
print(4+5) # 9
# subtraction
print(10-7) # 3
print(7-10) # -3
# multiplication
print(4*5) # 20
# division (true division)
print(10/3) # 3.3333333333
# floor division
print(10//3) # 3 # quotient of 10/3
# modulus
print(10%3) # 1 # remainder of 10/3
# exponentiation
print(2**3) # 8
# concatenation
print('apple' + 'pie') # applepie
# multiplication
print('apple'*3) # appleappleapple
Hope this was clear and easy to understand.
If this story was helpful and you wish to show a little support, you could:
These actions really really help me out, and are much appreciated!
Ebooks I’ve Written: https://zlliu.co/ebooks
LinkedIn: https://www.linkedin.com/in/zlliu/
Forget everything that you have been learn about while loops.