print("Hello World")

# basic grammer

print(" 2 + 2:", 2 + 2)

print(" 50 - 5*6:", 50 - 5*6)

print(" (50 - 5*6) / 4:", (50 - 5*6) / 4)

'''
Division (/) always returns a float. To do floor division and get an integer result (discarding
any fractional result result) you can use the // operator; to calculate the remainder you can use %
'''

print(" 17 / 3:", 17 / 3)

print(" 17 // 3:", 17 // 3)

# With Python, it is possible to use the ** operator to calculate power

print(" 5 的 2次幂:", 5 ** 2)

print(" 2 的 7次幂:", 2 ** 7)

'''
There is full support for floating point; operators with mixed type operands convert the integer
operand to floating point:
'''

print("3 * 3.75 / 1.5", 3 * 3.75 / 1.5)

print("7.0 / 2", 7.0 / 2)

'''
In interactive mode, the last printed expression is assigned to the variable _. This means that
when you are using Python as a desk calculator, it is somewhat easier to continue calculations,
for example

tax = 12.5 / 100
price = 100.50
tax * price
price + _
round(, 2)
'''



