# 02. Football Results

Jun 19th, 2021
604
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. first_result = input()
2. second_result = input()
3. third_result = input()
4.
5. win_cnt = 0
6. lost_cnt = 0
7. drawn_cnt = 0
8.
9. home_result = int(first_result[0])
10. guest_result = int(first_result[2])
11. if home_result > guest_result:
12.     win_cnt += 1
13. elif home_result < guest_result:
14.     lost_cnt += 1
15. else:
16.     drawn_cnt += 1
17.
18. home_result = int(second_result[0])
19. guest_result = int(second_result[2])
20. if home_result > guest_result:
21.     win_cnt += 1
22. elif home_result < guest_result:
23.     lost_cnt += 1
24. else:
25.     drawn_cnt += 1
26.
27. home_result = int(third_result[0])
28. guest_result = int(third_result[2])
29. if home_result > guest_result:
30.     win_cnt += 1
31. elif home_result < guest_result:
32.     lost_cnt += 1
33. else:
34.     drawn_cnt += 1
35.
36. print(f"Team won {win_cnt} games.")
37. print(f"Team lost {lost_cnt} games.")
38. print(f"Drawn games: {drawn_cnt}")
39.
RAW Paste Data