
AP CSP - UNIT 1 - REVIEW
Presentation
•
Instructional Technology
•
9th Grade
•
Practice Problem
•
Medium
Klea h
Used 5+ times
FREE Resource
12 Slides • 12 Questions
1
AP CSP - CHAPTER 1
By Klea h
2
1.1 The Iterative Development Process
Creating a program is similar to the scientific method—you start with a problem, investigate, test, and improve.
A development process is incremental, so it breaks the problem into smaller pieces and makes sure each piece works before adding it to the whole.
The Iterative Development Process explains how an idea becomes a useful program. It is a process where ideas are repeatedly improved based on feedback and testing. It is ordered and intentional. This process is a cycle(iterative), which means to repeat a process, getting a slightly different (hopefully better) result each time.
At the end, programmers take what they learned from testing and feedback and use it to create, design and implement new ideas to make improvements.
3
4
Key Vocabulary
Innovating: Creating new ideas and turning them into real solutions
Iterative Development: Designing and improving a program through cycles of testing and feedback
Debug: Finding and fixing errors in a program
Final Takeaway
The best programs aren’t written in one
try—they are built through testing, feedback,
and improvement. Think before coding,
plan carefully, and keep improving!
5
Multiple Choice
A program that Thomas has written is complete. It has been tested thoroughly, and some outputs were not as expected. Thomas is now going through the code carefully attempting to establish the cause of these errors and change the code to remove them. What is this procedure called?
Developing
Error Check
Coding
6
Multiple Choice
Understanding of the life cycle of a program is an essential component to becoming an effective programmer. Which of the following is the best example of how the life cycle of a program should work?
Idea→write code→algorithm→execute code→debug→maintain
Idea→algorithm→write code→execute code→debug→maintain
Idea→algorithm→write code→execute code→maintain→debug
Idea→algorithm→write code→debug→execute code→maintain
7
Multiple Choice
Jeremiah is part of a group planning a summer fair at which local businesses can run stalls and events. He wants to use his programming skills to develop an app for the fair which businesses will be able to use to communicate information about their activities at the fair with visitors. Which of the following would be the best first step for Jeremiah to take?
Write some sample code to understand how the app might work
Develop all of the major algorithms which will be required for the app by drawing flowchart representations
Find out from the businesses and potential visitors what information and format they think should be used for the app
Write thorough documentation explaining how the code for the app works
8
What is an algorithm? Set of step by step instructions to accomplish a task or resolve a problem.
Why are algorithms important?
1. They are tools for problem solving.
2. They help us find an efficient step-by-step process for a working solution.
3. They provide an outline for HOW to write code for a specific program.
4. They help us construct and express a detailed sequence of operations that harness computing power.
What is Algorithmic Thinking? (Learning to think with logical steps)
The process behind:
● Organizing complex thoughts in a logical and structured order.
● Constructing a conceptual solution that can be implemented.
How Algorithms Are Constructed?
Most algorithms are composed of familiar patterns that control the flow of execution for instructions: sequencing, selection, and iteration.
1.2: ALGORITHMS
9
Sequencing: Executes statements one at a time (often called linear).
Selection: Uses “if…then” to tell computer how to select a step or to tell the sequence that should be executed.
Iteration: Uses repetition (loops) – repeating actions until a certain condition is met.
WRITING THE BEST ALGORITHMS: Well-written algorithms are specific and precise.
Key Features of Algorithms
1. Clear Format: Each step should be easy to see.
2. Imperative statements: written with a verb phrase Example: “put on,” “move forward,” etc.
3. Descriptive qualifiers: contains detailed instructions. Example: "Put on the shoe" - Say “left shoe” instead of “shoe.”
What information should algorithms include? Only necessary instructions that are accurate.
Basic Algorithms --> • Recipes • Sorting laundry • Putting things in alphabetical order • Solving a Rubik’s cube
10
Multiple Choice
Consider the following two implementations of the same algorithm, each written in a different language.
Language A:
Calculate the average daily rainfall for the week (averageRainfall) by adding together the rainfall totals for each of the 7 days of the week (sun, mon, tue, wed, thu, fri, and sat) and dividing the sum by 7.
Language B:
Take the total amount of rain from each day of the week (sunday, monday, tuesday, wednesday, thursday, friday and saturday) and then average them together to get the average daily rainfall for the week (averageRainfall).
Which of the following statements about these two implementations is true?
Language B is ambiguous because the process of “average” is not explained well
Language A is ambiguous because it is unclear what sun, mon, tue, wed, thu, fri, and sat refer to in context with the problem.
The algorithms in both languages are ambiguous because they do not specify the actual values of the seven daily rainfall totals.
Neither of these languages is clear enough that a programmer could write a correct solution in a high-level programming language.
11
Multiple Choice
The algorithm below simulates rolling a regular 6-sided die twice. Consider the goal of determining if the sum of the values of the two rolls is odd or even.
What conclusions can be made with regard to what we are trying to determine? Select two answers:
Correct Answer
If the value found in step 6 is 10, 20, 30, 40, 50 or 60 then the sum is even
If the value found in step 6 is not 20, 40, 60, 80, 100 or 120 then the sum is odd
If the value found in step 6 is 10, 30 or 50 then the sum is odd
If the last digit of the value found in step 6 is 5, then the sum is odd
12
Multiple Choice
Which of the following should be true of any algorithm?
I. The order in which the steps making up the algorithm are followed is logically determined
II. Following the instructions in the algorithm will always result in the same outputs, regardless of any inputs
III. The instructions in the algorithm contain all necessary information to be implemented
I is true.
I, II, III are true.
II, and III is true.
13
1.3 Languages
A language (in comp science) is a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks. In the programming process, languages are used to write code.
Natural Languages
These are everyday languages like English, Spanish, or Chinese.
They are used in both spoken and written form.
Natural languages can be unclear or confusing because of things like slang, tone, or multiple meanings, so they are not good for writing computer programs.
Artificial Programming Languages
These are special languages made for a specific purpose, like telling a computer what to do.
Examples include Python, Scratch, and C++.
They are designed to be clear and unambiguous, so the computer understands exactly what you mean.
They use keywords, numbers, and punctuation in a structured way.
14
Language Hierarchy: Languages are divided on how well they work for humans vs. computers:
Type | Description |
|---|---|
Natural Language | Best for people (e.g., English), but too confusing for computers |
High-Level Language | Easy for people to read and write, like Python or Scratch |
Low-Level Language | Closer to what computers understand, but harder for people to read |
Machine Language | Just 1s and 0s, works only for computers — very hard for humans |
Key Takeaway
Programming languages are made to be precise and clear, so both humans and machines can work together.
The closer a language is to binary (machine code), the harder it is for people to use—but the easier it is for the computer to understand.
High level code is translated into machine code using a compiler, so that it makes sense to the pc's processor.
15
Multiple Choice
Which of the following is the MOST important reason computers use artificial languages over natural language?
The syntax of artificial languages is explicit and unambiguous
The meaning of different characters and words in an artificial languages is explicit and unambiguous
The meaning of different characters and words in an artificial languages is too complicated
The syntax of natural languages is easy to translate by computers
16
Multiple Choice
Which of the following best describes high-level computing languages?
They are not ambiguous
They evolve naturally over time
They are made to be parsed easily by machines
They are extremely difficult for humans to read and understand
17
18
19
20
Dropdown
21
Multiple Choice
A type of memory that can hold data for long periods of time, even when there is no power to the computer, is called ___________.
RAM
Optical Disk
Secondary Storage
CPU storage
22
1.8 Defining Variables
A variable is like a labeled container that holds a value (like a number, word, or list). The value can change while the program runs — for example, when a user fills out a form.
Creating and Using Variables
Declaring a variable means creating it in code. Initializing means assigning a value to it.
Some languages (Python) let you use a variable without declaring its type, while other languages (Java or C++) require you to specify the data type.
A variable can only hold one type of value. For example, variable int age cannot hold value 2.4.
Variable names can’t start with numbers and can’t use reserved words (like if, print, else etc.).
23
Multiple Choice
Which of the following is a reason for the importance of variables in programming?
Variables allow you to change a value used in multiple places in a program easily.
All of these
Variables assist in making code more readable.
Variables allow you to store values calculated by the program and access them at a later point in the program.
24
Multiple Choice
Which of the following statements best describes the predictability of the results when this algorithm is run on a computer?
The answer displayed by the algorithm for any known value of n can always be predicted.
The algorithm always displays the same answer, regardless of the value of n.
The answer displayed by the algorithm can be predicted for some values of n, but not for others.
It is impossible to predict the value of the answer displayed, even if the value of n is known.
AP CSP - CHAPTER 1
By Klea h
Show answer
Auto Play
Slide 1 / 24
SLIDE
Similar Resources on Wayground
18 questions
Central Idea vs. Theme
Presentation
•
9th Grade
20 questions
respiratory system bio lesson
Presentation
•
9th Grade
20 questions
Advertisement
Presentation
•
9th Grade
20 questions
GOOGLE APPS
Presentation
•
9th Grade
20 questions
Lesson 1 Review :Introductions/Greetings
Presentation
•
9th Grade
19 questions
Parallel and Perpendicular Lines Review
Presentation
•
9th Grade
19 questions
Preposiciones de lugar
Presentation
•
9th Grade
20 questions
Sustainability Lesson with Videos
Presentation
•
9th Grade
Popular Resources on Wayground
6 questions
PRIDE Always and Everywhere
Presentation
•
12th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
26 questions
KOR Review Kahoot Questions
Quiz
•
8th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
12 questions
Unit Zero lesson 2 cafeteria
Presentation
•
9th - 12th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
10 questions
Riddles Riddles fun Riddles
Quiz
•
6th - 12th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
Discover more resources for Instructional Technology
12 questions
Unit Zero lesson 2 cafeteria
Presentation
•
9th - 12th Grade
10 questions
Riddles Riddles fun Riddles
Quiz
•
6th - 12th Grade
10 questions
Would you Rather?
Quiz
•
9th - 12th Grade
20 questions
Characteristics of Life
Quiz
•
9th - 10th Grade
10 questions
Scientific Method (The scientific method)
Interactive video
•
9th Grade
20 questions
REGULAR Present tense verbs
Quiz
•
8th - 9th Grade
10 questions
Soup, Salad, or Sandwich?
Quiz
•
1st Grade - Professio...
10 questions
Labor Day and Its Historical Significance
Interactive video
•
7th - 12th Grade