Coming off a respectable 7-6 record last year, your football team is looking to
ID: 3624717 • Letter: C
Question
Coming off a respectable 7-6 record last year, your football team is looking to improve on that this season. They have contacted you and asked for your help projecting some of the scenarios for their win-loss record. They want you to write a function called team Record which takes in two parameters - wins, and losses, and returns two values season, and Percentage. Season should be a logical result that is true for a winning season. v Percentage is the percentage of games won (ranging from 0 to 100). For example, teamRecord(3, 9) should return season = false, = 25 teamRecord( 10, 2) should return season = true, w Percentage = 83.3Explanation / Answer
season = wins > losses;
wPercentage= (wins/(wins + losses))*100;
season =
0
wPercentage =
25
>> [season wPercentage] = teamRecord(10, 2)
season =
1
wPercentage =
83.3333
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.