I am getting an error when I try to run this simple python script:
def ask_x():
x = int(input('What is X?'))
def ask_y():
y = int(input('What is Y?'))
def result():
print(z)
def count():
if (x>10):
z = x + y
else:
z = 0
print('nono')
#start of program
ask_x()
ask_y()
count()
result()
I am using Python 3. I tried searching the forum and found Stackoverflow - input() error - NameError: name '…' is not defined but it doesn't work for me.