first hw batch 15.3.25 at 11:09
This commit is contained in:
commit
288c7e127a
10 changed files with 73 additions and 0 deletions
10
py/IfElseStatements/challenge2.py
Normal file
10
py/IfElseStatements/challenge2.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Question: Change your password program you created earlier. If they enter “letmein”, display the message “access granted” otherwise display “access denied”.
|
||||
|
||||
# Ask the user to enter the password
|
||||
password = input("Enter your password: ").strip()
|
||||
|
||||
# Check if the password is "letmein"
|
||||
if password == "letmein":
|
||||
print("Access granted")
|
||||
else:
|
||||
print("Access denied")
|
Loading…
Add table
Add a link
Reference in a new issue