Advertisement
Guest User

05.Oscars

a guest
Jun 25th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. actors_name = input()
  2. points = float(input())
  3. people = int(input())
  4.  
  5. ascii_sum = 0
  6. actor_mark = 0
  7. total = 0
  8. all = 0
  9.  
  10.  
  11.  
  12. while people != 0:
  13.     if points >= 0:
  14.         all = points
  15.         points = 0
  16.     jury_name = input()
  17.     mark = float(input())
  18.     people -= 1
  19.     ascii_sum += len(jury_name)
  20.     actor_mark = (ascii_sum * mark) / 2
  21.     total += actor_mark + all
  22.     if people != 0:
  23.         ascii_sum = 0
  24.     if total >= 1250.5:
  25.         break
  26.  
  27. if total >= 1250.5:
  28.     print(f"Congratulations, {actors_name} got a nominee for leading role with {total:.1f}!")
  29. else:
  30.     print(f"Sorry, {actors_name} you need {abs(1250.5 - total):.1f} more!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement