Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. days=int(input())
  2. money_won=0
  3. days_won=0
  4.  
  5. for i in range(days):
  6. list_events=[]
  7. j=0
  8. money_won_day=0
  9. while 1>0:
  10.  
  11. competition_type=input('')
  12. if competition_type=='Finish':
  13. break
  14.  
  15. list_events.append(input(''))
  16.  
  17. if list_events[j]=='win':
  18. money_won_day+=20
  19.  
  20. j+=1
  21. if list_events.count('win')>list_events.count('lose'):
  22. days_won+=1
  23. money_won=money_won+money_won_day*1.1
  24. if days_won/days>0.5:
  25. money_won=money_won*1.2
  26. print(f'You won the tournament! Total raised money: {money_won:.2f}')
  27. else:
  28. print(f'You lost the tournament! Total raised money: {money_won:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement