Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is part 03, kindly check the last part Part VI: Run the game (20 marks) You will use a loop to take input from

This is part 03, kindly check the last part image text in transcribed
Part VI: Run the game (20 marks) You will use a loop to take input from the user, who is the "scorekeeper." This loop will prompt the user to type one letter to indicate which team scored: " h " for the home team or "a" for the away team. It will then prompt the user to type one letter to indicate the type of score: " g " for goal or " b " for behind. This loop will keep running until the user types " f ", to indicate full time (the end of the match). In action, the loop might look like this: Which team scored? h Goal or behind? b The current score is 0.1 (1) to 0.0(0). Which team scored? a Goal or behind? g The current score is 0.1 (1) to 1.0 (6). Which team scored? h Goal or behind? g The current score is 1.1 (7) to 1.0 (6). Which team scored? f FULL TIME Melbourne Demons 1.1 (7) defeated Western Bulldogs 1.0 (6). For example, if current score is 1.10, it means 1 goal and 10 behind so final score would be 6+10=16. Please supply screenshots of the output of your program. Part VII: Test Results for invalid input (10 marks) Please supply screenshots for the output of your program for invalid input values - that is inputs other than " h","a ", " b ", "g", or " f " entered in the scorekeeping loop

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

Step: 3

blur-text-image

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

Beginning PostgreSQL On The Cloud Simplifying Database As A Service On Cloud Platforms

Authors: Baji Shaik ,Avinash Vallarapu

1st Edition

1484234464, 978-1484234464

More Books

Students also viewed these Databases questions