'16-'17 General Discussion for Lesson 3.3


I’ve uploaded the code into github.

The simulation runs as a netbeans project and is all cli (no graphics)… Shouldn’t be too hard to make it a standalone graphics thing. I don’t have a standalone server that I can put it up and host it as a servlet - that would be ideal, then folks can just plug in the code, adjust some parameters, and off it goes.

I am definitely interested in helping on the widget in any way that I can.


A suggestion for the first SWAP activity in 3.3. The initial example does not say where the left hand should be at the start of the short SWAP program. I would add a line right at the start that says “Move LH to position 0”. JR


Here is a solution for the Hi-Low in the Challenges

1 Jump to Line 3 if LH lt RH
3 Jump to Line 6 if RHPos is 7
4 Shift RH to R
5 Jump to Line 1
6 Move LH to Position 6
7 Jump to Line 9 if LH lt RH
9 Jump to Line 12 if LHPos is 0
10 Shift LH to L


I am new to the teacher community, I was introduced by a friend of mine, I usually just follow the instructions with my students and we find the answers along the way. But we seem to have a discrepancy on the homework I assigned (the Optional Challenges), and if it’s not of any problem, could someone please direct me to the answers for the assignment.
Please and Thankyou.


According to the answer key, the official solutions to Hi-Lo, Partition and Count are coming soon. There is a solution listed above for Hi-Lo. I will inquire about timeline for the solutions.


Welp. Guilty. I didn’t put solutions to all the problems because I didn’t have time, I just thought they were interesting problems. Happy to hash out solutions here on the forum though if someone wants to start.


Any one have solutions to the challenges that still say coming soon.


New to this class… Can students cut the coding strips and mix and match them? Like use a line that says, “SWAP If _____ is ______ than _____”?


Sure! A teacher actually shared an electronic drag and drop template for this lesson. May be you could use that!


Great! Thanks! I told them it was okay, but wasn’t sure if the “language” was supposed to remain intact for this particular lesson.


The main idea here is to have students use a limited set of instructions. So students program under constraints. As long as you don’t open it up to using any instruction, I think it would be okay.


That’s what I wondered. They are only using the parts that were provided on the cut out page. I did allow them to cut them and rearrange them.


Hi @sraper,

From the commands I’m seeing, I don’t believe you can do a “Swap if ___ is ___ than "

There is a "Jump to line ___ if (
is ___ than ___)”… and a standalone “Swap” command… but I don’t believe you can take one command and replace a part of another command.

In other words, when you say you have your students cut the coding strips, they can cut them out as seen in the image above, but they should not cut them into parts smaller than that - they may not cut out "Jump to line __ " and replace it with “swap” to form “swap if __ is __ than ___”.