Advertisement
veronikaaa86

06. Oscars

Jul 24th, 2022
1,377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. name_actor = 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.     points = float(input())
  9.  
  10.     current_points = (len(name) * points) / 2
  11.     total_points = total_points + current_points
  12.  
  13.     if total_points >= 1250.5:
  14.         break
  15.  
  16.  
  17. if total_points < 1250.5:
  18.     diff = 1250.5 - total_points
  19.     print(f"Sorry, {name_actor} you need {diff:.1f} more!")
  20. else:
  21.     print(f"Congratulations, {name_actor} got a nominee for leading role with {total_points:.1f}!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement