I got 99 Problems Can someone please help me with this


#1



def greaterlessequal5(answer):
    if condition:(>5):
        return 1
    elif condition (<5):
        return -1
else:
return 0
print greaterlessequal5(4)
print greaterlessequal5(5)
print greaterlessequal5(6)


#2

its should be like that

def greaterlessequal5(answer):
    if answer > 5:
        return 1
    elif answer < 5:
        return -1

#3

It's still showing up wrong when I put that in.

def greaterlessequal5(answer):
if answer > 5:
return 1
elif answer < 5:
return -1
else:
return 0
print greaterlessequal5(4)
print greaterlessequal5(5)
print greaterlessequal5(6)


#4

the name of your function should be def greater_less_equal_5(answer): change it in all your code


#5

def greater_less_equal_5(answer):
if "answer" > 5:
return 1
elif "answer" < 5:
return -1
else:
return 0


#6

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!
That's the message i get regardless of the function i use.


#7

I keep getting the same error message. Sebi, did you ever figure out the problem?


#8

def greater_less_equal_5(answer):
if answer > 5:
return 1
elif answer < 5:
return -1
else:
return 0

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

I was having the same issue as you were and went back over the instructions carefully. The example photo above was sort of misleading as showed actualinteger expressions. The correct coding seemed to be putting the word answer (no qoutes) >/< and the number 5. This cleared it up for me.


#9

Thanks johnnyboy16, I thought I had tried answer sans quotes but I guess not. Totally worked!