반응형
잘못된 변수 이름 사용
문제 코드:
name = "Alice"
print(nam)
오류 메시지:
NameError: name 'nam' is not defined
해결 방법: 변수 이름을 정확하게 입력해야 합니다.
name = "Alice"
print(name)
#파이썬 #error #debug #nameError
반응형
'파이썬 > 에러 디버깅' 카테고리의 다른 글
TypeError: can only concatenate str (not "int") to str (0) | 2024.08.17 |
---|---|
NameError: name 'greet' is not defined (0) | 2024.08.10 |
NameError: name 'name' is not defined (0) | 2024.08.10 |
IndentationError: unindent does not match any outer indentation level (0) | 2024.08.04 |
IndentationError: unexpected indent (0) | 2024.08.04 |