I've done something stupid haven't I? 1/7


#1

Yeah i can't believe I am stuck on this :sweat_smile:


#2

return statements shouldn't be a string
it should be return True or return False


#3

@boardrockstar33942 @ryebread4

Ryebread4 is correct, though you can return anything in python in this instance it wants the literal True or False.


#4

@boardrockstar33942, @zeziba, @ryebread4,
If you look at the error-output
there is a complaint about indentation....

In Python indentation with 4-spaces....

def aFunction( oneParameter ):
    #next line of function, an identation 4 spaces
    print oneParameter
    if oneParameter == 1:
        #next indentation 4 spaces
        print "You gave me a 1"
    else:
        print "You gave me something else: " + str(oneParameter)

now calling the function aFunction
providing 1 argument in this case a number Value

aFunction(1)
aFunction(2)

#5

I just wasn't paying attention to notice the indentation


#6

Hi @boardrockstar33942 ,

In addition to the indentation issue, and the fact that the by_three function should return a boolean rather than a string, the cube function also needs to be revised. You have it printing a result instead of returning it.

That result computed by cube should be either number ** 3 or number * number * number. As it is defined now, your cube function computes the square of number, rather than the cube.


#7

Re-type the exact same thing after resetting the code, are you sure you want true and false as strings?

P.S Don't copy paste