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 ProgramingPython Programing The goals scored in a soccer match may be input

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!