Я новичок в Python,
Я изучаю «если и еще» условие в Python 3.7.
Так что проблема в том, когда я набираю этот код
def age_group(user_age):
x = int(input("Enter your age :"))
return x
if x < 150 :
print(age_group(x))
else :
print("Either he is GOD or he is dead")
Но после выполнения я получаю NameError: -
Traceback (most recent call last):
File ".\Enter Age.py", line 6, in <module>
if x < 150 :
NameError: name 'x' is not defined