Python Python Basics Types and Branching If, Else and Elif


Hello, craig
Traceback (most recent call last):
File "", line 3, in <module>
if frist_name == "Craig":
NameError: name 'frist_name' is not defined WHY DO I GET THIS ERR???

1 Answer

Jennifer Nordell
Jennifer Nordell
Treehouse Staff

Hi there, shmuel zilberman ! Unfortunately, we really can't help much without seeing all of your code usually, but I do have a thought on this. It says that frist_name is undefined. My guess is that earlier in your code, you defined a variable named first_name. Note the spelling difference between "frist" and "first". Try changing:

if frist_name == "Craig":

To this:

if first_name == "Craig":

Hope this solves it, but let us know if you´re still stuck! :sparkles: