Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days=int(input())
- money_won=0
- days_won=0
- for i in range(days):
- list_events=[]
- j=0
- money_won_day=0
- while 1>0:
- competition_type=input('')
- if competition_type=='Finish':
- break
- list_events.append(input(''))
- if list_events[j]=='win':
- money_won_day+=20
- j+=1
- if list_events.count('win')>list_events.count('lose'):
- days_won+=1
- money_won=money_won+money_won_day*1.1
- if days_won/days>0.5:
- money_won=money_won*1.2
- print(f'You won the tournament! Total raised money: {money_won:.2f}')
- else:
- print(f'You lost the tournament! Total raised money: {money_won:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement