Skip to content

Classify Age

Andrew Burke edited this page Apr 3, 2024 · 6 revisions

def classify_age(age):

if age < 18:

return "child"

else:

return "adult"

output = classify_age(18)

print(output)

output = classify_age(7)

print(output)

output = classify_age(50)

print(output)

Clone this wiki locally