Question: Python Programing The goals scored in a soccer match may be input as a sequence of 1s and 2s terminated by 0 . The number
Python Programing
The goals scored in a soccer match may be input as a sequence of 1s and 2s terminated by 0 . The number 1 would mean that team 1 made a goal and 2 would mean that team 2 made a goal. Thus the sequence 12121120 means that Team 1 made 4 goals and team 2 made 3 goals in all. Write a program that would input such sequence and output how many goals each team made and the result of the match ("Team 1 won", "Team 2 won", "Both tied"). Ensure that inputs are 0,1 and 2 only
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
