This program is supposed to greet a user, but it crashes with a NameError.
When you run the starter code, Python stops and shows something like:
NameError: name 'nme' is not defined
A NameError means you used a name that Python has never seen. Almost always it's a typo — you spelled a variable one way when you defined it, and a different way when you used it.
Your task
- Read the traceback and notice which name Python says is not defined.
- Look at the line where
name is created near the top.
- Fix the typo on the
print line so it uses the variable that actually exists.
When it works, the program should print exactly:
Hello, Sam!
Tip: the variable is defined as name, so the f-string should reference {name}.