8/14 : More with 4, is this a bug?


#1



Hello,
Please I need help with this. It seems like a bug because the console prints the right answer.


https://www.codecademy.com/fr/courses/python-beginner-fr-FR-9h219/1/5?curriculum_id=5370f030fed2a866a2000001#


in the french version of this exercise, we are asked to print the double (numbers*2) of the numbers of the list and not the square.


So here is the code I used :

ma_liste = [1,9,3,8,5,7]
liste_finale = []

for nombre in ma_liste:
liste_finale.append(nombre*2)

print liste_finale

and this is the translation of the error message that I get "Oops, try again, it seems your loop doesn't print 2"

Is this a bug of some sort or have I done something wrong ?


Replace this line with your code.


#2

you don't have to create a list, you can simple add a print statement inside the for loop, and print nombre * 2

That is it, you overcomplicated it.


#3

Thank you so much !!!
This was driving me mad :slight_smile: