Big If? What is an argument?


#1

Make sure that the_flying_circus() returns True

def the_flying_circus(answer):
if (answer>5) or (answer<6):
return True
elif (answer==5) and (answer!=5):
return False
else:
return 0
print the_flying_circus(9)
print the_flying_circus(5)
print the_flying_circus(3)

The interpreter shows True True True but I am getting the prompt that the_flying_circus should not take any arguments?


#2

and I wrote the following code again and it got accepted.But it was a fluke.

Make sure that the_flying_circus() returns True

def the_flying_circus():
if 3>5 or 5<6:
return True
elif 5==5 and 5!=5:
return False
else:
return 0
print the_flying_circus()
print the_flying_circus()
print the_flying_circus()

in the print command, shouldn't there be anything between the parantheses?


#3

no, print("i am printed") is python3 and later, print "i am printed" is python2. codecademy uses python2.7.3

for next time, use one of the two following options to make your code/indent visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard


#4

To which parentheses are you referring? Since the the_flying_circus function is defined without any parameters in its function header, it should not be passed any arguments when it is called.


#5

oops, i was not reading careful, never answer a question in a rush.

@geekmyth, where you referring to this lines:

print the_flying_circus()

nope, there shouldn't be anything between the `()`, your function doesn't take any arguments. Remember a function call is simple the functionname with `()`, like so:

the_flying_circus()

if you function where to take arguments, this is where you pass the arguments:

the_flying_circus(arg1,arg2,arg3)

so when you call your function with a print statement:

print the_flying_circus()

the () are not of the print statement, but the function call


#6

Got it! Thank you so much


#7

I don't understand what I need to do for this challenge. What are my arguments? Nothing is working for me. I need help


#8

Could you post your code what you tried?


#9

Hi can someone explain what al these print options are
print the_flying_circus()
print the_flying_circus()
print the_flying_circus()


#10

They are all the same? they all print the result of the_flying_circus function