0

password = input("your") if password == "PKMKB" : print("Access Granted") else: print("Access Denied")

PLEASE CAN ANYBODY TELL ME WHY MY CODE IS NOT WORKING. I AM NOOB AT THIS

24th Jun 2020, 5:42 AM
HARSIMRAN SINGH
HARSIMRAN SINGH - avatar
5 Answers
0
Because you forgot indentation and indentation is compulsory in python So your program has to be like this : password = input("your") if password == "PKMKB" : print("Access Granted") else: print("Access Denied")
24th Jun 2020, 6:01 AM
ycsvenom
ycsvenom - avatar
0
Thanx Bro
24th Jun 2020, 6:05 AM
HARSIMRAN SINGH
HARSIMRAN SINGH - avatar
0
You are welcome
24th Jun 2020, 6:06 AM
ycsvenom
ycsvenom - avatar
0
Bro it worked with the same password.
25th Jun 2020, 1:31 AM
HARSIMRAN SINGH
HARSIMRAN SINGH - avatar