The theme park kiosk asks kids for their age, but some type "twelve" or nothing at all. Write parse_age(text): if it turns into a whole number, return that number; if not, return None.
parse_age("12")→12parse_age("twelve")→Nonedef parse_age(text):
try:
# your code here: turn text into an int and return it
pass
except ValueError:
return None
Run tries the examples. When they look right, Submit.