← back to unit
Medium
# searching medium
Is Everyone Registered?
Field trip day! The teacher has the class list and the list of kids whose permission slips came back. 📋
You get the classlist and the registered names. If every classmate registered, print all set. Otherwise print the first classmate (in class-list order) who didn't.
Example:
Input: classlist = ["mia", "leo", "kai"], registered = ["leo", "mia", "kai"]
Output: all set
Every classmate turns up somewhere in registered, so nothing is missing.
Input: classlist = ["mia", "leo", "kai"], registered = ["mia", "kai"]
Output: leo
"leo" can't be found in registered, and he's the first classmate the search fails on.
💡 need a hint?
srch-everyone-registered.py🔒 given lines are locked — write your code in between
loading...