Skip to content
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)
  1. 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 float
    • print (f "your score is & score}, your height is {height}, you are winning is{isWinning}")
    • in an f string :.x behind a float displays x characters after the decimal point. print (f"Each person should pay {answer:.2f3")
  2. If Else greater than >, less than <, greater than or equal >=, less than or equal <=, equal ==
    • if CONDITION:
      • Do Something
    • else:
      • Do Something else

tagcheck

tagcheck