Operators
What is an operator? Who is the operator for bitwise XOR? Who is the operator for floor divison?
Operators
""" The + operator concatenates two strings
The * operator performs repetitions on strings
"""
a = 'Hello'
b = 'World'
print(a + ' ' + b)
print(a * 3)
"""
Hello World
HelloHelloHello
"""
Floor Division
minutes = 105
hours = minutes // 60
remainder = minutes - hours*60
print(remainder) # 45
Last update: 129 days ago