minte9
LearnRemember



pag. 26
pag. 86


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
"""

Exponential

 
n = 6**2 + 6

print(n)  # 42

Bitwise

 
n = 6^2  # XOR

print(n)  # 4

Division

 
n = 105 / 60

print(n)  # 1.75

Floor Division

 
minutes = 105
hours = minutes // 60

remainder = minutes - hours*60
print(remainder)  # 45



  Last update: 129 days ago