CJCoding With Joseph
15free / daySign inCreate account

Password Gate

Ask for a password with the prompt Password: (one space after the colon) and compare it with the secret open sesame: a match prints Access granted, anything else prints Access denied. Input: one line, the password typed. The prompt is part of the output and stays on the same line as the verdict, as shown in Expected Output. Compare the strings with ==.

Expected Output:

Password: Access granted

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
If Statements
📥 Auto-Input:
open sesame\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.