Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 onlyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started