Question
Paralympic swimming relay competitions involve competitorsof different disability levels makingup a team. For those with physical disabilities, eachswimmers disability is rated on a scale of1-10
Paralympic swimming relay competitions involve competitorsof different disability levels makingup a team. For those with physical disabilities, eachswimmers disability is rated on a scale of1-10 and the total points rating for the 4 swimmersmust be no greater than a given number ofpoints. For example, a legal relay team for a 34-pointfreestyle relay may consist of two S8swimmers and two S9 swimmers (9 + 9 + 8 + 8 = 34),or an S10 swimmer and three S8swimmers (10 + 8 + 8 + 8 = 34). Write a program thatuses a loop to work out the total disabilitypoint score for a single team, and check that it islegal, for a given point score relay.
The program must be split in to functions that takearguments and return results in a sensibleway. One function should take the swimmers number(1-4) as argument and ask for and returnthe number the user inputs (that swimmers disabilitycategory). Another function shouldcalculate the legality of the team, when given asan argument the total of the four disabilityclasses and the maximum total allowed.
Step 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