Example - under 18
Input
is_adult(16)
Output
False
16 is less than 18, so the function returns False.
Full lesson preview
Learn how to produce and return boolean values using comparisons. Practice writing a simple condition that yields True or False.
Problem statement
Task
Examples
Input
is_adult(16)
Output
False
16 is less than 18, so the function returns False.
Input
is_adult(18)
Output
True
Age 18 meets the threshold for being an adult, so the function returns True.
Input format
Output format
Constraints
Samples
Input
is_adult(20)
Output
True
20 is >= 18, so return True.