Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- teamA_score = 0
- teamB_score = 0
- while True:
- random_number = random.randint(0, 99)
- if random_number < 50:
- teamA_score += 1
- else:
- teamB_score += 1
- if (teamA_score >= 25 or teamB_score >=25) and abs(teamA_score - teamB_score) >= 2:
- break
- if teamA_score > teamB_score:
- winning_team = "Team A"
- else:
- winning_team = "Team B"
- print("Final Score:")
- print("Team A:", teamA_score)
- print("Team B:", teamB_score)
- print("Winning Team:", winning_team)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement