Exercise 10.3: Getting this error: "You can only use 1 print statement for this exercise!" even when i am using exactly one print statement!


#1

Hello. I am stuck at this exercise.
https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/0/3?curriculum_id=4f89dab3d788890003000096#

Although my code shows correct output but still i get the error: "Oops, try again. You can only use 1 print statement for this exercise!"


a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
for output in a:
    if output % 2 == 0:
        print output


Can anyone please help!


#2

did you try after refreshing your browser?


#3

Yeah. But it was of no use.


#4

Screenshot attached now. Sorry i forgot to attach earlier :slight_smile:


#5

Solved! i removed all commented lines and bingo! But why commented lines have to do anything with print statement? :confused:


#6

your code is fine.it's not your fault.In your own environment you can write that :slight_smile:
Actully system checker checks how many print statement you've in the code.so being print word in your comment it counts that.
so here you can change the word from print to Print.


#7

Got it! Thankyou very much! :slight_smile:


#8

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