Did i miss something?


#1

I made a simple code but i did not work:
is_even = int(raw_input())
if(is_even % 2 == 0):
<>return True
else:
<>return False
The error was that return is outside function.
I tend to be really careless but i just cant spot whats wrong.How do i fix this?


#2

Yep you can only call return in a function. ie within this context

def functionName(arguments):
	#statements

and it is pertinent that you write your logic in a function


#3

Thanks!Problem solved.