+ 5

Please who can tell me why interpreter keep saying word is not defined?

>>> word = input("enter a word:") enter a word:cheese >>> print(word + 'shop') NameError: name 'word' is not defined 😑 >>>

15th Oct 2017, 3:48 AM
Dzoyem Barry
Dzoyem Barry - avatar
2 Antworten
+ 5
oh, lemme try
15th Oct 2017, 3:53 AM
Dzoyem Barry
Dzoyem Barry - avatar
+ 2
Maybe try putting that in a .py file instead, then running it.
15th Oct 2017, 3:51 AM
LunarCoffee
LunarCoffee - avatar