Let's make a simple password prompting system.
Allow the user to type in something , save it to the variable called password.
Determine if the password is correct
Example :-
password = input("what is the password")
if password == "a^3$5|s":
print("access granted")
lets improve this system The else statments cover all the situation's where the if statement falls to execute .
Example :-
password = input("what is the password")
if password == "a^3$5|s":
print("access granted")
else:
print("access denied")
0 Comments