0
password protection error!pls help
this is the code: user=input("enter your username:") if user == bob: print("correct username") else print("wrong username") i get indentation error i tried all i could but it dosent get fixed
2 odpowiedzi
+ 2
you forgot to put ':' on else statement and also the else statement should also be the level of indentation.
here's the fixed code.
user=input("enter your username:")
if user == bob:
#don't forget to give the value of bob variable.
print("correct username")
else:
print("wrong username").
0
if and else must be in the level of indentation.
bob is not defined anywhere, should be "bob".
user = xxxxxx
if user == "bob" :
xxxxxx
else:
xxxxxx