APCS Principles Semester 1 Final Exam Review Part 1
Flashcard
•
Computers
•
11th Grade
•
Practice Problem
•
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
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
38 questions
Chemistry Concepts and Reactions
Flashcard
•
10th Grade
26 questions
Biomolecules
Flashcard
•
12th Grade
35 questions
2425 F6 Mock P1A (Modified v1)
Flashcard
•
12th Grade
32 questions
R11.1 The purpose of testing digital components.
Flashcard
•
12th Grade
38 questions
Theater and Film Vocabulary
Flashcard
•
11th Grade
31 questions
Spanish-English Friendship Phrases
Flashcard
•
KG
33 questions
CCEA GCSE Spanish Context 3 Vocabulary
Flashcard
•
10th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade