Challenge yourself

Beginner
Intermediate
Expert

Write a function is_adult, that takes an integer, age, and returns True if it is greater than or equal to 18, or False otherwise.


Write a function is_registered, that takes a string, code, and returns True if code is "ADMIN" or "USER", and False otherwise.


Write a function access, that takes an integer and a string, age and code, and:
  - It returns "No access" if age is less than 18 and code is not "ADMIN" or "USER"
  - It returns "Partial" if age is greater than or equal to 18 or code is "ADMIN" or "USER"
  - It returns "Full" if age is greater than or equal to 18 and code is "ADMIN" or "USER"

Restriction: You CANNOT use any relational operator inside this function's body (<, >, !=, ...).