Troubles with the Big If


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-python/lessons/conditionals--control-flow/exercises/the-big-if?action=lesson_resume

<In what way does your code behave incorrectly? Include ALL error messages.>
Tells me either the_flying_circus should not make arguments, or the syntax is incorrect

<What do you expect to happen instead?>
Expect “else” code to run, printing the string

```python

def the_flying_circus(answer):
if (answer > 28 and answer != 42):
print ‘COOL’# Start coding here!
# Don’t forget to indent
# the code inside this block!
elif (answer == 26 or answer >= 45):
print ‘COOLER’
# Keep going here.
# You’ll want to add the else statement, too!
else:
print ‘COOLEST’

<do not remove the three backticks above>

#2

This means that our function shouldn’t take any arguments/parameters when its called.

e.g

def my_function(parameter):
   """<-snip->"""


#and when we call it...

print my_function(argument) #<= we are asked not to have any arguments.

We don’t want arguments/parameters when defining our function and when calling it.
In your function, your parameter is answer… we don’t want that. :slight_smile:

You should reread the instructions again. (And don’t forget to indent)

Also , remember this,

the_flying_circus() must return True when evaluated.


#3

GOT IT. I neglected to use the return button. Thank you!


#4

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