Practice Makes Perfect


#1



def cube (number) :   
    return number**3
def by_three(number):  
    if (number % 3==0):
       return cube(number)
    else: 
        return False
print by_three(6)       


However,I don't know where I was Wrong.The progress tells me there is something wrong.

Traceback (most recent call last):
  File "python/cli_runner.py", line 152, in <module>


#2

this line:

def by_three(number):

what you have at the end, is not a colon (it should be a colon)


#3

Sorry,I do not understand.


#4

Thanks .Just I make it.You are right.


#5

what character did you use? (good you fixed it :slight_smile: )


#6

I use the chinese format.


#7

I am afraid that won't work. Now you know so, so you should be able to prevent repeat :slight_smile:


#8

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