is_even one question


my code:

def is_even(x):
x = int(raw_input("Please enter a number:"))
if x%2 == 0:
return True
return False

However it return
Oops, try again. is_even(16) raised the following error: invalid literal for int() with base 10: ''

I don't know where the problem is, anyone could figure it out? Thanks!


`def is_even(x):
if x%2==0:
return True
return False

number = int(raw_input("Enter a number: "))
print is_even(number)`

Enter the value and than call the value in that function , dont change it while calling it


Thanks to diwakar_sharm
I understand what's wrong with my logic