Unit 2 Lesson 2: Minimum Card Algorithm


I haven’t done the Code.org CSP training. I really like the algorithm design here, but am a little confused. Are the students able to change the position of the cards? (The cannot in the next lesson). Can they “swap” card positions (which would not directly mirror using indexed lists)? I think I’m not being creative enough, but I cant seem to come up with multiple ways to solve the problem. I guess I need some more guidance on how to lead this activity in the most meaningful way.



I would redirect students to the ‘rules’ in the handout but not rule on the ‘swap’ myself. Most of the solutions will be very similar, however there may be some solutions that bend, or even break, the rules. That’s okay! The goal for this part of the lesson is to develop some algorithms and discover the commonalities between them in preparation for the next activity. Since this is a new lesson, I am looking forward to the designs my students will come of with.

Happy Coding!


To piggy back on Andrea’s response.

Lesson 2 is meant to be pretty open and free-form. Students may think of some real out of the box ideas, which is fine and encouraged.

As andrea says, the point is to discover some commonalities in the quest to come up with a definition for a language that you all can use to design algorithms. We then coerce it into version 1 of the human machine language (which does not have swap). But notice that there are a few more conditions on the setup and the ending state for findMin with the human machine language.