Problem with printing


I’ve tried to print something after the function so I could know that the function is working, but nothing happens. I wonder what am I doing wrong and how can I get the result I want
Here’s the code:

def cube(number):
return number**3

def by_three(number):
if number%3 == 0:
print "Number is divisible by 3"
return cube(number)
print "Number is not divisible by 3"
return False



Other people won’t be able to run your code to see for themselves unless they have an exact copy (they also might not be able to find the cause of what you describe)


How can I copy my code with saving it’s format and position?


There’s a button for that in the editor, you can also put ``` on its own line before and after the code


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