20. Math Operators: plus, minus, multiply, divide, to the power ( +, -, * , /, ** )
- Division always results in float
- Precedence: paranthesis, exponents, (multiply, divide Left To Right), (+,- Left To Right)
- F Strings
- Var += 1 # same as var=var + 1
- f strings save a lot of conversions
f "your score is {score}"works even if score is integer or floatprint (f "your score is & score}, your height is {height}, you are winning is{isWinning}")- in an f string
:.xbehind a float displays x characters after the decimal point.print (f"Each person should pay {answer:.2f3")
- If Else greater than >, less than <, greater than or equal >=, less than or equal <=, equal ==
- if CONDITION:
- Do Something
- else:
- Do Something else
- if CONDITION: