Find out how this is even working

Plz find out how this is working even without global keyword

def check():
    if x%2==1:
        return False
    else:
        return True
print(check())

It is not working as it’s showing :

NameError: name 'x' is not defined

Did you declare x or read x before use?

x is not declared

you have to define whether the type of variable int,float or others…either as argument or inside the function

value of X is not defined though

Sorry I posted the incomplete code
x=int(input())
def check():
if x%2==1:
return False
else:
return True
print(check())