I got 99 problems


#1



https://www.codecademy.com/courses/python-beginner-BxUFN/3/4?curriculum_id=4f89dab3d788890003000096#


it says:
1
1
1
None

and says
Oops, try again. It looks like your function output 1 instead of -1 when answer is 3. Make sure you filled in the if and elif statements correctly!


not sure what to do

Replace this line with your code. 
def greater_less_equal_5(answer):
    if 6 > 5:
        return 1
    elif 3 < 5:          
        return -1
    else:
        return 0
        
print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)


#2

here you have function calls:

print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)

which have arguments (4, 5 and 6) which are copied into the function parameter (answer)

so you should compare answer to 5, this way, your function is able to tell if the number is greater, smaller or equal to 5 for any number you supply as argument on function call


#3

I'm sorry I don't understand what you mean


#4

here we declare our function which has a parameter answer:

def greater_less_equal_5(answer):

then when we call the function, we supply arguments:

print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)

4, 5 and 6 are now arguments and they are received by the function parameter:

def greater_less_equal_5(answer):
    print answer

print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)

see how 4, 5 and 6 are printed? so your comparison should be done using answer, so your function call tell for any number if the number is smaller, greater or equal to 5


#5

thanks! starting to get the hang of this but still sometimes confused. it worked!


#6