Advertisement
veronikaaa86

02. Bonus Score

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