I need help please!


#1

help me with the lesson practise make perfect !

i'm bagging you !
:sob: :sob: :sob: :sob: :sob: :sob: :sob: :sob: :sob: :sob: :sob:


#2

It's fine. Let's see your well formatted code and error.


#3

this is my code
def cube(number):
if cube == cube.upper():
return "The cube of that number!"
def by_three(number)
if by_three == number.upper():
return "False!"


#4

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! :slight_smile:


#5

Thank you you are the best
teacher ! I hope i 'll be like you
:grin: :grin: :grin: :grin: :grin:


#6

:blush:

Have fun coding! Consistency and persistence should get you there. :slight_smile:


#7

help me with this lesson


#8

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:

animals.insert(duck_index, "cobra")


#9

thanks but i found the solution by myself


#10

Awesome. Sorry I came in late.

Keep on! :slight_smile:


#11

but hhhhh can you help me with this :kissing: :kissing: :kissing: :kissing: :kissing:

this is my code

the lesson for one and all


#12

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.

:slight_smile:


#13

oh thanks where are you from sir


#14

You're welcome.

By nationality, I'm a Nigerian. A country in Western Africa.

Why do you think I'm a "sir"? :slight_smile:

[On this discuss alone, you've marked like 3 different changing solutions. :smile: No harm. Just thought to mention.]

Keep on coding! :slight_smile:


#15

and i'm a tunisian pupil you know !!!
hhhhhhhhhhhhhhhhhhh


#16

Awesome! :slight_smile:


#17

i need help again ! hh



#18

The value for the key "name" shouldn't be in bracket.

You should have it like:

"name": "Lloyd"

Repeat for each dictionary.

See if this resolves. :slight_smile:


#19

thank you very much !


#20

You're welcome.

Code on! :slight_smile: