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
Already have an account?
Similar Resources on Wayground
34 questions
Biomolecules and Enzymes
Flashcard
•
9th - 10th Grade
40 questions
Collaboration in Software Development
Flashcard
•
11th Grade
33 questions
US History WW1 and the 1920's
Flashcard
•
11th Grade
25 questions
CPU Architecture - DG
Flashcard
•
10th Grade
28 questions
Vocabulary Flashcards
Flashcard
•
10th Grade
28 questions
Identifying Fingerprints
Flashcard
•
10th - 12th Grade
34 questions
6.1 Introduction to the Atmosphere
Flashcard
•
11th - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
20 questions
christmas songs
Quiz
•
KG - University