APCS Principles Semester 1 Final Exam Review Part 1

Flashcard
•
Computers
•
11th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

40 questions
Show all answers
1.
FLASHCARD QUESTION
Front
A certain game keeps track of the maximum and minimum scores obtained so far. If num represents the most recent score obtained, which algorithm correctly updates the values of the maximum and the minimum? Options: If num is greater than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num. If num is less than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num. If num is less than the minimum, set the minimum equal to num. Otherwise, if num is less than the maximum, set the maximum equal to num. If num is greater than the minimum, set the minimum equal to num. Otherwise, if num is less than the maximum, set the maximum equal to num.
Back
If num is less than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.
2.
FLASHCARD QUESTION
Front
Which algorithm allows the robot to make a single circuit around the rectangular region of black squares, finishing in the exact location and direction that it started in each of the four grids? Step 1: Keep moving forward, one square at a time, until the square to the right of the robot is no longer black. Step 2: Turn right and move one square forward. Step 3: Repeat steps 1 and 2 three more times.
Back
Step 1: Keep moving forward, one square at a time, until the square to the right of the robot is no longer black. Step 2: Turn right and move one square forward. Step 3: Repeat steps 1 and 2 three more times.
3.
FLASHCARD QUESTION
Front
Three different numbers need to be placed in order from least to greatest. For example, if the numbers are ordered 9, 16, 4, they should be reordered as 4, 9, 16. Which of the following algorithms can be used to place any three numbers in the correct order?
Back
If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them. Then, if the first number is greater than the middle number, swap them.
4.
FLASHCARD QUESTION
Front
A teacher has a goal of displaying the names of 2 students selected at random from a group of 30 students in a classroom. Any possible pair of students should be equally likely to be selected. Which of the following algorithms can be used to accomplish the teacher’s goal? Options: Step 1: Assign each student a unique integer from 1 to 30. Step 2: Generate a random integer n from 1 to 30. Step 3: Select the student who is currently assigned integer n and display the student’s name. Step 4: The student who was selected in the previous step is assigned 0. All other students are reassigned a unique integer from 1 to 29. Step 5: Generate a new random integer n from 1 to 29. Step 6: Select the student who is currently assigned integer n and display the student’s name.
Back
Step 1: Assign each student a unique integer from 1 to 30.
Step 2: Generate a random integer n from 1 to 30.
Step 3: Select the student who is currently assigned integer n and display the student’s name.
Step 4: The student who was selected in the previous step is assigned 0. All other students are reassigned a unique integer from 1 to 29.
Step 5: Generate a new random integer n from 1 to 29.
Step 6: Select the student who is currently assigned integer n and display the student’s name.
5.
FLASHCARD QUESTION
Front
What is displayed as a result of executing the algorithm in the flowchart?
Back
5
6.
FLASHCARD QUESTION
Front
Which of the following initial values of j and k will cause the algorithm represented in the flowchart to result in an infinite loop? Options: j = -5, k = 5; j = 0, k = 5; j = 5, k = 0; j = 5, k = -5
Back
j = 5, k = -5
7.
FLASHCARD QUESTION
Front
Based on the algorithm represented in the flowchart, what value is displayed if j has the initial value 3 and k has the initial value 4?
Back
12
Create a free account and access millions of resources
Similar Resources on Wayground
33 questions
AP Computer Science Applications - Final Exam Spring 2025

Flashcard
•
10th Grade
28 questions
Units 1 to 6: Mock Exam Final - AP Computer Science A

Flashcard
•
9th - 12th Grade
38 questions
AP Computer Science Principles Practice

Flashcard
•
10th Grade
38 questions
AP Computer Science Principles Practice

Flashcard
•
10th Grade
36 questions
python functions

Flashcard
•
12th Grade
30 questions
AP CSA Unit 2 Review

Flashcard
•
10th - 12th Grade
37 questions
p5Play Project Golf & Helicopter Midterm Review w/ Annotations

Flashcard
•
10th Grade
37 questions
AP CSP Exam Review

Flashcard
•
9th - 12th Grade
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade