The big if


#1

I have troubles with the else syntax, doesnt realiza what could it be, some one knows how to do this exercise? i leave my code below...

Make sure that the_flying_circus() returns True

def the_flying_circus():
if 15>=12: # Start coding here!
print "I learn more everyday"
elif 60>30 and 20<30:
print "Trying"
else: print "Almost done"


#2

Hello,

First of all, it would be nice if you had used the code format editor as your code seems to be python and it is indentation sensitive.

Well, your last statement of else should return and not print True nor print "Trying" as the error pointed to.

I recommend you make the if and elif conditions false so it does the else.

A quick recommended solution is as below:

def the_flying_circus():
	if 15 <= 12: # This is false and won't print/return
		return "I learn more everyday"
	elif 60>30 and not 20<30: #this is false to and won;'t print/return
		return "Trying"
	else:
		return True
print the_flying_circus()

Hope this helps! :slight_smile:


#3

@clusterthewalker Well first of all, Python is an indent based language, so make sure the indents in your code are correct. Also you have no return statement, although the instructions tell you to make sure the function returns True. If you fix both of those problems, you should be good. :slight_smile:

-- @chipjumper36731


#4

Thanks alot Bayoishola20 !!! ill look on topics for someone who needs help,
just as u did with me, thanks again bro!

More than machinery we need humanity, more than technology we need
cleverness -Chaplin-


#5

Thanks, i already fix it ! ill return the favor to someone else, spiral of
human helping humans to code.Good vibes!