It’s fine. Let’s see your well formatted code and error.
this is my code
if cube == cube.upper():
return “The cube of that number!”
if by_three == number.upper():
If you had formatted it, that would have been lovely.
However, you had syntax issues and mixed-up the code.
You end a function with a colon. You didn’t do so here:
See below for re-written code.
def cube(number): #cube function with number parameter return number**3 #returns cube of number def by_three(number): if number % 3 == 0: return cube(number) else: return False
Hope this helps!
Thank you you are the best
teacher ! I hope i 'll be like you
Have fun coding! Consistency and persistence should get you there.
help me with this lesson
Haha… Someone has already helped out.
You need to add the item “cobra” at the index in your list
duck_index. So you have it as:
thanks but i found the solution by myself
Awesome. Sorry I came in late.
From that I can see, the instruction says to do:
for number in my_list: print 2 * number
However, interpreting the error in error in the interpreter, your indentation of
number variable is wrong.
When you add a colon, just hit the enter key on your keyboard and it will indent it rightly for you.
oh thanks where are you from sir
By nationality, I’m a Nigerian. A country in Western Africa.
Why do you think I’m a “sir”?
[On this discuss alone, you’ve marked like 3 different changing solutions. No harm. Just thought to mention.]
Keep on coding!
and i’m a tunisian pupil you know !!!
The value for the key
"name" shouldn’t be in bracket.
You should have it like:
Repeat for each dictionary.
See if this resolves.
thank you very much !