What I find odd is that if
index is a gray area of understanding, then list slicing would be even more cryptic. There is some incongruency, here.
I’ve mentioned in the past that the issue may stem from the name of the function…
This implies that it is the INDEX that is doubled, not the value AT that index.
would be less ambiguous.
As far as this problem having gotten any review, such as confirming that list indices, accessing values by index and mutating a list by accessing, changing, and replacing values, as well as other list operations are well explained, I can neither confirm nor deny said review.
Until such time as said review/revision takes place we are left to deal with each learner in turn, and try to suss out what they do understand, and what not. Yes, it means answering the same question multiple times, but that is my choice. I could just pass the question over and leave the learner to keep digging.
mtf, you are an absolute gem. A big hug. I have learnt patience and the willingness to always want to give helping hand. At this stage i have a fair understanding of the concept but i wont leave until i am 100% satisfied.
Thank you mtf and all the codeacademy team
Thank you so much for actually going line by line through the solution. I have read all the comments/replies here and was no further ahead in understanding what the code in the solution was actually doing. I was frustrated that I was not grasping it. Even putting the code through the visual python utility (http://pythontutor.com/visualize.html#mode=display) did not assist my understanding.
Your explanation is what I needed, so many thanks!
Nope, you did not miss anything. There is a flaw in the course progression.
Well that explains the problem. None of that was taught to me in the class. I quadruple checked all of my notes (which are really shadow copies of EVERYTHING that I’ve been taught) - not one piece of that info was in there.
Referring this to @lilybird for further investigation.
def double_index(lst, index):
if index >= len(lst):
lst[index] *= 2
I have solved this challenge with the code above. However, I have a question regarding the code.
- if index >= len(lst):
Why is the assignment operator >= ? Python is xero-indexed, but I do not understand what is being executed.
Because if the index is not less than the length, it is out of range. That means equal or greater.
Wow, thank you for responding so quickly! Sorry about my late response, I was at my grandparents for the Thanksgiving Break and grandma bans electronics. I understand this concept now.
Who would argue with Gran? The vittles are more than enough reward!
I’ve created a ticket for our Curriculum Team to audit this code challenge. I will report back here once I get an update. Thanks for flagging the issue.
I just want to add that CodeAcademy jumps around in their curriculum when a person subscribes to a certain track like “Computer Science,” rather than if a person had selected Python as their one track. As someone who is a beginner to CS and Python, I think this selection of problems is a little advanced. There was definitely a learning curve spike from the last project I was working on, and it doesn’t help that the prompt is confusing and hard to follow.
glad you felt like that . Ive been doing this for 5 weeks as a total newbie and find it very confusing … think i will have to pick it to pieces
There’s no lesson on assigning to a particular index in a list prior to this challenge. I’m doing the Analysing Financial Data with Python path and can vouch the same. You posted a link to selecting from a particular index above - not assignment.
This thread proves introducing it first in a challenge with no examples throws people off, sometimes causing them to give up coding for weeks. Especially considering that by this point, we’ve gained complete trust in the fact that everything is excellently explained on Codecademy before we’re expected to apply for ourselves in a challenge.
I was on the same page as you for this one. I am still a little confused. I guess we need to use an IF statement to see if the lst == index?
I agree with you on this one. I also believe some things such as .zip and .append need to be practiced more thoroughly. They threw one lesson for each in there and expect us to do a project now and use them without enough practice?