Error message is incorrect on List element modification


#1

The website prints the wrong error message for this mistake.
(the mistake is that print [n] should be print n or print (n))

n = [1, 3, 5]
# Do your multiplication here

#print n[1]*5
n[1] = n[1]*5
print [n]

https://www.codecademy.com/courses/python-beginner-nzzVa/0/2?curriculum_id=4f89dab3d788890003000096#


#2

Did you accidentally remove the print statement that was on line 4?

Looking at it, there is no print statement on line 4 so the error message is valid.

Work at the doing things as instructed.


#3

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