New to programming


I am having the same problem. Please help I am new to programming.
Here is my code
ef cube(number):
number = 3
return number * number * number

def by_three(number):
if number % 3 == 0:
return cube(number)
return False

print cube(1)
print by_three(1)

27 ------these are the answer I am getting
False ---

Practice makes perfect lesson

How new? Have you plopped yourself down here without any precursor reading? What are you already familiar with? It will help us going forward.


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