Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def who_win(round_a, round_b):
- score_1 = 0
- score_2 = 0
- if round_a[0] > round_a[1]:
- score_1 += 1
- elif round_a[0] < round_a[1]:
- score_2 += 1
- else:
- pass
- if round_b[0] > round_b[1]:
- score_1 += 1
- elif round_b[0] < round_b[1]:
- score_2 += 1
- else:
- pass
- if score_1 > score_2:
- print("1 win")
- elif score_1 < score_2:
- print("2 win")
- else:
- print("draw")
- #Main Program
- who_win((5,4),(10,10))
- who_win((1,1),(2,2))
- who_win((1,2),(2,2))
Advertisement
Add Comment
Please, Sign In to add comment