96.6k views
5 votes
write the code that writes access granted if the correct password, swordfish is entered and access denied! otherwise

User Jeana
by
4.7k points

1 Answer

7 votes

In python 3.8:

if input("Enter password: ") == "swordfish":

print("access granted")

else:

print("access denied!")

User The Hand Of NOD
by
5.7k points