FAQ: Survey of Computer Science - The Tale of Kenny - What are Algorithms?

This community-built FAQ covers the “What are Algorithms?” 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 What are Algorithms?

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!

What are the lists that I am suppose to create from the code? And how do I empty or fill them?

I think I could find most of the steps in the Kenny’s Algorithm list, except I could not find:
2. Create empty list of paired students.

Can anyone help, please?

At the way bottom of the code where it says student_pairs = is where the empty list is created.

1 Like

Hello, I think we just need to add ‘kennys_algorithm(student_grades)’ at the end of the code and hit run and the program that is there will produce the list of paired students. Hope that helps.

Hello, when starting to write an algorithm/program, would you recommend to write out the general steps in simple english before starting with any coding?

How to Think Like A Programmer-Andy Harris

This YouTube video really helped me understand algorithms! And yes, he suggested you should figure out what you need to solve and the steps it takes to solve it before you ever write the first line of code. And if this one doesn’t work for you, there are several others. I had tried starting from the other direction and got nowhere in a year of self instruction. Learning this first is really helping me understand the basic concepts much faster. I hope this helps!

Good Luck and Happy Coding!
Adreanna

1 Like

While I was reading through the information for “Kenny’s Algorithm”, I was confused by line item #3. Here’s a screenshot of the existing text as of today (Friday, Sept. 10, 2021):

I keep thinking that line #3 should read: “Until the list of unpaired students is COMPLETE, repeat the following steps” etc.

The way it’s set up here I believe unpaired_students contains a finite list of students. Bit by bit students are removed from the unpaired_students list and added to a new list of paired_students. So at some point unpaired_students should be empty. I hope that makes sense.

1 Like

Ahhhh OK, yes I see where my confusion was (and no longer is). Thank you very much for your explanation/clarification here!

1 Like

Yes, that is what the comments are for. It helps to break the steps in our mind.