Whats wrong with my else statement


#1



def the_flying_circus(n):
     if "cheese" == "brownie":
         return True
    elif 7 <  8 and 8 < 9:
         return True
         else:
             return "nothing"

it says I have "invalid syntax" for my else statement, what do I do


#2

Yeah, your else indentation is off.

Take it and its associate one step outward.

def the_flying_circus(n):
	if "cheese" == "brownie":
		return True
	elif 7 < 8 and 8 < 9:
		return True
	else:
		return "nothing"

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.