dkyoseff

Conditional Statements - Exercise / 02. Bonus Score

Jul 9th, 2022
884
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. number = int(input())
  2.  
  3. bonus = 0
  4.  
  5. if number <= 100:
  6.     bonus = 5
  7.  
  8. elif number > 1000:
  9.     bonus = number * 0.1
  10. else:
  11.     bonus = number * 0.2
  12.  
  13. if number % 2 == 0:
  14.     bonus = bonus + 1
  15. elif number % 10 == 5:
  16.     bonus = bonus + 2
  17.  
  18. print(bonus)
  19. print(bonus + number)
  20.  
Advertisement
Add Comment
Please, Sign In to add comment