I wrote the below code and tried to run it, but it's not running. Does it have a bug that I can't spot?
def greet():
print('Hi there mister')
kor_Var = input('Enter kor')
if kor_Var != walls:
print('Incorrect pin')
else:
greet()
You need to change "walls" as string:
def greet():
print('Hi there mister')
kor_Var = input('Enter kor')
if kor_Var != "walls":
print('Incorrect pin')
else:
greet()
"walls" or 'walls' (Python 3.6.3 (Anaconda)). I don't understand why Jamuhuri Fuschia can't get it to work.
wallsis not a string, use'walls'. Or you didnt show it. And what do you mean byits not running?