veronikaaa86

06. Oscars

Mar 20th, 2022 (edited)
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. actor_name = input()
  2. init_points = float(input())
  3. count_people = int(input())
  4.  
  5. total_points = init_points
  6. for i in range(1, count_people + 1):
  7.     name = input()
  8.     current_points = float(input())
  9.  
  10.     points = (len(name) * current_points) / 2
  11.     total_points = total_points + points
  12.     if total_points >= 1250.5:
  13.         break
  14.  
  15. if total_points < 1250.5:
  16.     diff = abs(1250.5 - total_points)
  17.     print(f"Sorry, {actor_name} you need {diff:.1f} more!")
  18. else:
  19.     print(f"Congratulations, {actor_name} got a nominee for leading role with {total_points:.1f}!")
Add Comment
Please, Sign In to add comment