my tip for you is to worry a bit less about syntax and worry about the logic more.
in pseudocode, i think this is pretty clear from #1 and #2 in the instructions:
Code
def cube(number):
#return cube of number
i expect you 100% to get that far.
then once you have that, you can google "python multiply" and turn your pseudocode into code:
Code
def cube(number):
return number * number * number
as for #3 and #4, you should have this much pseudo code simply by following the instructions
Code
def by_three(number):
# if number is divisible by 3
# then call cube(number)
# otherwise
# then return false
a lot of beginners copy/paste shit they dont understand and try desperately to modify it until it runs and does what they want. that looks like what you did from the hint. don't do that. start with the logic so that you understand exactly what it's supposed to do, then slowly translate your ideas into code.
This post was edited by carteblanche on May 20 2015 10:37pm