Advertisement
veronikaaa86

02. Bonus Score

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