Good, I am learning Python and I was curious, since I am new in this programming, when declaring a variable in a function, can not you specify the type of variable as if you did it normally? I want to do this but you can see that the program does not leave me.
def es_par(int(numero)):
if numero%2==0:
return True
else:
return False
print(es_par(input("Introduce un numero")))
The only solution I find is to do this:
def es_par(numero):
if numero%2==0:
return True
else:
return False
print(es_par(int(input("Introduce un numero"))))
Thank you very much and sorry for my ignorance:)