AP CSP - Algorithms Exam Review #1

docx

School

Horry-Georgetown Technical College *

*We aren’t endorsed by this school

Course

168

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

5

Uploaded by BailiffTeamLark9

Report
AP CSP - Algorithms Exam Review #1 The following slide notes will be present on the exam: - Algorithms and Control Structures - Control Structures - Iterations - Iterations In Python - Selections - Nested Iterations & Selection Note: Any information from these slides is fair game for the exam. Having a general knowledge of the concepts and code will give you the greatest success for the exam. **This review will be a separate grade. 1. Given the original and ending mazes below, write a sequence of commands that will move the triangle. Criteria: Use only selections to move the triangle.
2. The following grid contains a robot represented as a triangle. The robot is initially facing right. Which of the following code segments can be used to move the robot to the gray square along the path indicated by the arrows?
3. Which AP pseudocode will output the same values as the Python code below? a = 0 while(a < 5): a += 1 print(a) a. b. c. d. e.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
4. Using Python, write a piece of code using a for loop and increment from 2 until 32 by threes and print the values. 5. Create a Flowchart for the for loop you created in the question above. 6. Create a program that uses a while loop. Provide a brief explanation of: WHY someone would your code WHAT does your code do? 7. Using a combination of sequence, iteration, and control statements, write the
commands that would be needed to move the triangle to the gray square. 8. Using a combination of sequence, iteration, and control statements, write the commands that would be needed to move the triangle to the gray square.