0

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 "<pyshell#5>", line 1, in <module>
    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

Rakesh
  • 81,458
  • 17
  • 76
  • 113

1 Answers1

2

It should be arany = 0, not arany: 0 - I'm not sure why that's even valid.

Max Armino
  • 23
  • 5