AYUDA URGENTE! TENGO 99 problemas pero un interruptor no


#1

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)

no me da correto me dice que su codigo esta apagado o parece apagado que hago
he tells me it’s not correct and he tells me my code is off or it look like off
what i can do?

thanks or gracias


#2

Try it with


def greater_less_equal_5(answer):
    # Sangría 4 espacios
    #print answer
    #No se olvide el colon
    if  answer >5:
        # Sangría 4 espacios extra
        return 1 
    elif  answer <5 :          
        return -1
    else:
        return 0

#Fin de la función
        
print greater_less_equal_5(4)
print greater_less_equal_5(5)
print greater_less_equal_5(6)

#3

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