๐Ÿ PyQuest๐Ÿค” Making Decisions ยท ๐Ÿ” Mission: Secret Clubhouse Password
โญ 0 XP๐Ÿ Python is waking upโ€ฆ

Mission: Secret Clubhouse Password ๐Ÿ”

You are the bouncer at the door of a very exclusive clubhouse. Nobody gets in without the password โ€” and nobody gets in if they're too young, either.

Time to combine everything from Unit 2 with input() from Unit 1.

One new trick you'll need: input() always hands you back text, even when someone types a number. To compare it like a number, wrap it in int():

age = int(input("How old are you? "))

if age >= 10:
    print("Old enough!")

Without int(), Python would be comparing the word "11" to the number 10 and get very confused. ๐Ÿ™ƒ

Your mission

  1. Use input() to ask for the secret password and store it in a variable
  2. Use input() again for their age โ€” wrapped in int() so it's a number
  3. If the password is correct and they're at least 10 โ†’ let them in! ๐ŸŽ‰
  4. Use elif for the sneaky case: right password, but too young โ†’ something funny
  5. Use else to send the wrong-password people away with a silly excuse

Make the messages as ridiculous as you want. That's the fun part.

Your code

Press โ–ถ Run to see what your code does!