Answered step by step
Verified Expert Solution
Link Copied!

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 Programingimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions