Okay so this is the code im testing and it simply doesnt work. Python says my x is not defined even though my set_x should set x to a value. What am I missing?
def hi():
print(x)
def set_x1():
x = "hello"
hi()
def set_x2():
x = "world"
hi()
set_x1()
set_x2()