Advertisement
JkSoftware

Day 2 - Mathematical Operations

Nov 4th, 2021
1,026
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print(3 + 5)
  2. print(7 + 4)
  3. print(5 * 5)
  4. print(10 / 2) #always float rather than int
  5. print(5 ** 2) #exponets
  6.  
  7. #*Follows the order of operations(PEMDAS)
  8. #*PEMDAS
  9. #*Parentheses
  10. #*Exponets
  11. #*Multiplication
  12. #*Addition
  13. #*Subtraction
  14.  
  15. print(
  16.     3 * 3 + (2 ** 2 + 7) / 2
  17. )
  18.  
  19.  
  20.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement