FAQ: Survey of Computer Science - The Tale of Kenny - Iteration


#1

This community-built FAQ covers the “Iteration” exercise from the lesson “Survey of Computer Science - The Tale of Kenny”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Code Foundations

FAQs on the exercise Iteration

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!


#2

what does the (being_cooked) represent in this code?


#3

If I understand correctly “being_cooked” is used as part of the definition of the function to stand for whatever the function will enter into the code. In this case, the list “on_the_griddle” (which stands for Kenny’s four sandwiches) is being plugged in to the space for “being_cooked”, and by doing that, that item is being added to each of the sandwiches in the list (like py add_spinach(on_the_griddle) adds spinach to the sandwiches.


#6

Pasting the line “py add_spinach(on_the_griddle)” as instructed doesn’t work and returns a syntax error. It works fine without the “py”


#7

That instruction may need review.

 py add_cheese(on_the_griddle)

is something we would write into the command line (bash), not the code source. This lesson does not have a command line.


#8

I couldn’t Really see what I was supposed to end up with, even though it let me move on. I had lots of iterations of eggs spinach etc, even though i was supposed ot have 4 omlets Very unclear instructions, it literally tells you to paste incorrect syntax