Exercise Bug


#1

https://www.codecademy.com/en/courses/python-beginner-en-cxMGf/1/2?curriculum_id=4f89dab3d788890003000096#

I couldn't find where to report a potential bug, but i'm sure this code wasn't supposed to be correct:


#2

Hi @universol,
Your program works as intended?
Can you explain what you find is odd or probable bug?


#3

The SCT can see required elements, but is not checking the order or the output. So long as you went back and did the exercise as expected and could still pass it is not considered to be a bug.


#4

There is only one input, and it is not inside the loop where it is supposed to be. golfing is being appended three times to the list, instead of three different hobbies. As stated, not a bug, just the SCT seeing the required elements so passing it. As for the printing that was not asked for, the SCT must be ignoring that.


#5

"Create a for loop that prompts the user for a hobby 3 times."

My code prompted once, appended the hobby as intended, and then printed 0, 1, 2 with no further prompts.


#6

So It works as intended ..
as It fullfills the requirement of Exercise "Create a for loop that prompts the user for a hobby 3 times." So it lets the code pass. :slight_smile:


#7

On a technical level the SCT "works as intended" however, it doesn't from a learning perspective. My concern isn't that Python can still process the code correctly, it's that the goal of the exercise isn't understood correctly.


#8

The SCT is not all that strict and a lot of incorrect code slips past. The main thing is that if the exercise is done correctly, and the user passes, these other flaws were allowed. The SCT has not been repaired for over two years and will not be revisited again. We consider a bug something that blocks a user from passing when they have the correct code according to the instructions.


#9

The instructions seem pretty clear to me.

hobbies = []
for i in range(3):
    hobbies.append(raw_input("Enter a hobby to add to the list: "))

#10

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