Hello community,
I’m still quite new here, so I hope I understand it well. If not, I apologize forwardly.
*In exercises for python 3, section loops, 7th task WHILE has a nice example. *
I followed instructions and only because of them, I found that code works even it shouldn’t (at least I assume)
I applied following code:
index = 0
while index < len(all_students):
- students_in_poetry.append(all_students.pop())*
- index += 1*
and this works. right side of the condition: while index < len(all_student) solves exercise, meanwhile this is a bit misleading. while index < 6: ( - putting the value after comparative operator works as it should.)
in the instructions: You are adding students to a Poetry class, the size of which is capped at 6. While the length of the students_in_poetry
list is less than 6
,… (we might find out that list students_in_poetry seems to be pre-set for 6)
My question (if this is the bug) in the topic of particular exercise wasn’t answered, so I lead my curiosity to understand correctly here.
Topic Title: Course name + section + what type of bug(is it a typo, instructions error, broken URL, SCT issue)
i dont know what type is this.
Summery of the report:
a condition in the example for this exercise allows students to pass with solution that doesn’t correspondent with instructions.
Course URL:
(https://www.codecademy.com/courses/learn-python-3/lessons/learn-python-loops/exercises/while)
Steps to Reproduce: N/A
Fix or Workaround: N/A
Please attach screenshots Not necessary