#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목변수지정2019-03-18 02:03
작성자

def sum(a,b):

    result = a+b

    return result


print(sum(x,y))


이것을 컴파일 시키면 에러로


NameError Traceback (most recent call last) <ipython-input-62-c08beb93e5b2> in <module> 3 return result 4 ----> 5 print(sum(x,y)) NameError: name 'x' is not defined 


이런 에러가 뜨는데 x를 정의하는 방법이 어떻게 될까요...?

댓글