So this is the basic string (the text is in hungarian before you are wondering):
>>> nev=input("add meg a neved: ")
add meg a neved: Kristóf
>>> print("Üdvözöllek, " + nev)
Üdvözöllek, Kristóf
>>> print("egy út előtt állsz")
egy út előtt állsz
>>> print("elindulsz rajta")
elindulsz rajta
>>> arany: 0
>>> print("Most" + str(arany)+ "aranyad van")
Traceback (most recent call last):
File "", line 1, in
print("Most" + str(arany)+ "aranyad van")
NameError: name 'arany' is not defined
The error message claims that the name is not defined, even though I gave it a value in the IDE, and I just cannot figure out what exactly did i wrote wrong...
any help would be greatly appreciated
解决方案
It should be arany = 0, not arany: 0 - I'm not sure why that's even valid.