Advertisement
simeonshopov

Oscars (june exam)

Nov 7th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. actor_name = input()
  2. start_points = float(input())
  3. jury_count = int(input())
  4. actor_points = start_points
  5. got = False
  6.  
  7. for i in range(jury_count):
  8.   name = input()
  9.   points = float(input())
  10.   actor_points += (len(name) * points) / 2
  11.   if actor_points > 1250.5:
  12.     got = True
  13.     break
  14.  
  15. if got:
  16.   print(f"Congratulations, {actor_name} got a nominee for leading role with {actor_points:.1f}!")
  17. else:
  18.   print(f"Sorry, {actor_name} you need {(1250.5 - actor_points):.1f} more!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement