Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this part you are given some broken code to fix. You are free to just re-write the whole function yourself, but it is a
In this part you are given some broken code to fix. You are free to just re-write the whole function yourself, but it is a good time to practice using the debugger. Fix the function schooldilemma ) that takes a single argument, age, which represents the age of a person. You may assume that age is a non-negative integer The function is supposed to return which school the person is best suited for, depending on their age: . if age is less than 6, then return 'Too young for school'. . if age is more than or equal to 6 and less than 11, then return Elementary school' . if age is more than or equal to 11 and less than 14, then return 'Middle school' . if age is more than or equal to 14 and less than 18, then return 'High school' . if age is more than or equal to 18, then return , College Remember that Python is a case-sensitive language. Lowercase and uppercase letters are not the same symbols! Examples: Return Value Function Call school.dilemma (16) High school' school.dilemma (3) Too young for school' school.dilemma (44) College' school.dilemma (7)Elementary school' schooldilemma (2)Too young for school' school.dilemma (4) Too young for school' schooldilemma (24)College' school.dilemma (37)College' school.dilemma (13)Middle school' school.dilemma (32) 'College' Note: The quotation marks displayed in the example return values are there to emphasize that the return values are strings. You should not add quotation marks to your return values
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