I am new to python and have a very simple question:
x="hello World"
print_x()
def print_x():
print(x)
this outputs NameError: name 'print_x' is not defined
and I don't know why because i defined it right there.
(This is my first time writing a function)