PdfPrep.com

You work for a company that distributes media for all ages

HOTSPOT

You work for a company that distributes media for all ages.

You are writing a function that assigns a rating based on a user’s age. The function must meet the following requirements:

• Anyone 18 years old or older receives a rating of “A”

• Anyone 13 or older, but younger than 18, receives a rating of “T”

• Anyone 12 years old or younger receives a rating of “C”

• If the age is unknown, the rating is set to “C”

You need to complete the code to meet the requirements.

Answer: E

xplanation: https://www.w3resource.com/python/python-if-else-statements.php

Exit mobile version