ramsess90

03. Game Statistics

Nov 29th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. minutes = float(input())
  2. name = input()
  3.  
  4. if minutes == 0:
  5.     print('Match has just began!')
  6. elif minutes < 45:  # TODO: tuk moje da e <=
  7.     print('First half time.')
  8. else:
  9.     print('Second half time.')
  10.  
  11. if 1 <= minutes <= 10:
  12.     print(f'{name} missed a penalty.')
  13.     if minutes % 2 == 0:
  14.         print(f'{name} was injured after the penalty.')
  15. elif 10 < minutes <= 35:
  16.     print(f'{name} received yellow card.')
  17.     if minutes % 2 == 1:
  18.         print(f'{name} got another yellow card.')
  19. elif 35 < minutes < 45:
  20.     print(f'{name} SCORED A GOAL !!!')
  21. elif 45 < minutes <= 55:
  22.     print(f'{name} got a freekick.')
  23.     if minutes % 2 == 0:
  24.         print(f'{name} missed the freekick.')
  25. elif 55 < minutes <= 80:
  26.     print(f'{name} missed a shot from corner.')
  27.     if minutes % 2 == 1:
  28.         print(f'{name} has been changed with another player.')
  29. elif minutes > 80:
  30.     print(f'{name} SCORED A GOAL FROM PENALTY !!!')
Advertisement
Add Comment
Please, Sign In to add comment