ITL - AP Programming Language Part 3 (Lesson)

Learning the AP Exam Reference: Part Three

Lists (Data Retrieval)

Lists are the organization of data. Lists make retrieval is easy. Carefully review how list information will be used on the exam in the next two videos.

Make note of the change from starting with an index of zero (0) as current computer science programming languages to using a starting index of one (1) which more mathematical languages have used. Languages that use a beginning index of 1 are Fortran and Cobol.  

Procedures

Abstraction is created with the procedures, moving the code out of the main program area so that the basis of the program is easy to read without being cluttered, and repetitive code is only written once. In Alice3 we used procedures to be abstractions without returns and functional procedures to be abstractions with a return. In the College Board AP Exam Language, all procedures are allowed to have a return if coded for one. There is not a differentiation of types.  

Robot

Lastly we have what College Board calls the robot, the moving of an object. In Alice the object moved left or right based on the perspective of the object. In this generic code the same is true, but the movement is 90 degrees and equates to a grid, like a checker-board where the object moves right, left, forward, and backward with the right and left being 90 degree turns. Objects movement must be checked to make sure space is available to move to (cannot take another's space) and the object does not go off the board. Watch the video below to review the object movement. College Board calls its movement of the object, robot movement.  

Remember we used robot code earlier in the year with the Lightbot Assignment.

VIDEOS CREATED BY GAVS AND USED ACCORDING TO TERMS OF USE.