Advertisement
JkSoftware

Day 2 - Number Manipulation and f Strings

Nov 4th, 2021
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. print(
  2. 8 / 3
  3. )
  4.  
  5. print(
  6. int(8 / 3)
  7. )
  8.  
  9. print(
  10. round(8 / 3)
  11. )
  12.  
  13. print(
  14. round(8 / 3, 2)
  15. )
  16.  
  17. print(
  18. 8 // 3
  19. )#floor division
  20.  
  21. result = 4 / 2
  22. print(result)
  23. result /= 2
  24. print(result)
  25.  
  26.  
  27. score = 0
  28. height = 1.8
  29. isWinning = True
  30.  
  31. print(
  32. f"Your Score is: {score}, your height is {height}, Winning = {isWinning}"
  33. )#f string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement