It says I got the answer right but I feel as if I didnt actually do it right because it looks kind of wonky and I will post a picture of my screenshot in the comments.
Continuing the discussion from The final ascent:
If you look at the example code you will see that it does not show that you need to print the items that are in the bag. You do not need the print(“rope”) at the end because of this. My code looked wonky at first like that too until I realized this.
Awesome, thank you. I was wondering why it came up so weird. It’s just kind of hard to put it down because it’s different than the actual things you practice on.
Thanks for catching this @Tanner_Vieth and @SaltySnit — we’re now working on updating the puzzle to provide feedback for scenarios like this (when there is an extra print function inside the for loop).
Also, @SaltySnit thanks helping explain the issue:
Yeah I totally agree. Glad I could help!
Wow! I’m glad I was able to help with the advancement of the grasshopper program. It really is fun.
I haven’t gotten to that lesson yet, but the second line (
element === 'rope';) either shouldn’t be there or needs to be changed; as it is, it checks to see if
'rope', but it doesn’t do anything with the result.
You can reset the lesson by tapping the symbol which shows two arrows chasing each other.
Mmmm — it’s a little tricky to tell, but I think maybe there is a space in your test.
So you have
element === ' rope', rather than
element === 'rope'.
See if you’re able to remove any spaces from the test; if that still doesn’t work reach out to us directly via firstname.lastname@example.org; that will allow us to see exactly the code you are running.
Actually, it looks like @Maxwell_Kwao has two spaces:
' rope '.
I suspect that the space temporarily added by the editor may confuse some people; I know it did for me.
There’s also the issue that not everyone has a 5.5" phone, so may have trouble reading the code, especially when crowded by quote marks. Not sure what you can do about that aside from maybe popping up a magnified view when touched.