Unit 2. Developing Programming Tools
Revision Date: Jun 11, 2020 (Version 3.0)Summary
This is the third session of a three-session lesson sequence with four topics covered by mini-lectures, explorations, and practice exercises.
Outcomes
Overview
An algorithm is more than just a sequence of steps: levels of abstraction are crucial to the working of algorithms, and sequencing, iteration, and other control structures are ubiquitous.
There are various ways of implementing the algorithm - running sequentially or parts running in parallel.
Student computer usage for this lesson is: optional
In Lesson Resources folder:
[Optional topic] Wikipedia article on Conway date algorithm.
Access to Youtube videos of people and Lego Robots solving Rubik's cubes.
Videos:
https://www.youtube.com/watch?v=X0pFZG7j5cE and /or
https://www.youtube.com/watch?v=_d0LfkIut2M
https://www.youtube.com/watch?
One or more Rubik's cubes.
Links to PDF copies of youcandothecube's solution to Rubik's cube (also copied into the Lesson Resources folder):
You Can Do the Rubik's Cube
Daily Homework Review
Go to this link: https://playtictactoe.org/ to demonstrate an online Tic Tac Toe game
Questions in the AP Classroom Question Bank may be used for summative purposes.
Sixty of the 80 questions are restricted to teacher access. The remaining 20 questions are from public resources.
Questions are identified by their initial phrases.
A programmer wrote the program below. The program
Consider the following program code. The block ...
In the program below, y is a positive integer (...
Programs I and II below are each intended to ca...
Two grids are shown below. Each grid contains a...
For the optional activity (Conway Algorithm), some students may have difficulty adding and subtracting dates to translate from a known day-of-the-week to another day in the same month. A chart on the wall, or a current calendar, could be a help.
Some students who are strong in other areas will have difficulty with the spatial aspects of manipulating a cube while retaining an orientation that will let them complete the steps of one of the sub-algorithms without errors. They may need to be paired with another student or the instructor until they master the technique of holding the cube fixed while rotating a face.
The notation of face turning (e.g. R versus R' or L versus L') can be confusing. Having the students practice with an empty jar with a lid can help. Orient the lid up (U), down (D), left (L), right (R), front (F), or back (B). The hand movement to screw the lid on is the same hand movement needed to perform the non-accented face turn. The hand movement needed to screw the lid off is the same as the accented turn (U', D', L', R', F', B').
Variation for class that does not have Rubik's cubes: Use the images from the Solution Guide: www.youcandothecube.com
Online rubik's cube solver:
The following "Checks for Understanding" could be used to guide the students towards the three learning objectives.
Objective: SWBAT translate sample pseudocode into a Python function.
Objective: SWBAT recognize layers of abstraction for solving a Rubik's cube.
SWBAT to identify sequencing, selection, and iteration elements in a problem solution.
Students will translate prior pseudocode into Python routines. They will recognize if their programs work correctly.
Students will deconstruct one of the Rubik's cube solution stages. These analysis results will be shared and critiqued.