Comp Sci Unit 3 #7

Quiz
•
Computers
•
11th Grade
•
Easy
Nick Nessralla
Used 13+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following grid contains a robot represented as a triangle, which is initially in the bottom-left square of the grid and facing the top of the grid. The robot can move into a white or a gray square but cannot move into a black region.
The following code segment implements an algorithm that moves the robot from its initial position to the gray square and facing the top of the grid.
When the robot reaches the gray square, it turns around and faces the bottom of the grid. Which of the following changes, if any, should be made to the code segment to move the robot back to its original position in the bottom-left square of the grid and facing toward the bottom of the grid?
Interchange the ROTATE_RIGHT and the ROTATE_LEFT blocks.
Replace ROTATE_RIGHT with ROTATE_LEFT.
Replace ROTATE_LEFT with ROTATE_RIGHT.
No change is needed; the algorithm is correct as is.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The grid below contains a robot represented as a triangle, initially facing up. The robot can move into a white or gray square but cannot move into a black region.
The code segment below uses the procedure GoalReached, which evaluates to True if the robot is in the gray square and evaluates to otherwise.
Repeated Until (GoalReached () )
{
<Missing Code>
}
Which of the following replacements for Missing Code can be used to move the robot to the gray square?
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing right.
Consider the procedures below.
Which of the following code segments will move the robot to the gray square?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The program segment below is intended to move a robot in a grid to a gray square. The program segment uses the procedure GoalReached, which evaluates to true if the robot is in the gray square and evaluates to false otherwise. The robot in each grid is represented as a triangle and is initially facing left. The robot can move into a white or gray square but cannot move into a black region.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The question below uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the bottom right square of the grid and facing toward the top of the grid.
The following programs are each intended to move the robot to the gray square. Program II uses the procedure , which returns if the robot is in the gray square and returns False
otherwise.
Which of the following statements is true?
Program I correctly moves the robot to the gray square, but program II does not.
Program II correctly moves the robot to the gray square, but program I does not.
Both program I and program II correctly move the robot to the gray square.
Neither program I nor program II correctly moves the robot to the gray square.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The question below uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the center square of the grid and facing toward the top of the grid.
The following code segment is used to move the robot within the grid.
A gray square represents a possible final location of the robot after the code segment is executed. Which of the following represents all possible final locations for the robot?
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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?
Create a free account and access millions of resources
Similar Resources on Wayground
9 questions
Square One V2X Challenge Quiz

Quiz
•
9th - 12th Grade
11 questions
AP CSP Review 11Q

Quiz
•
10th - 12th Grade
10 questions
AP CSP Boolean Logic 4

Quiz
•
9th - 12th Grade
15 questions
LEGO Ev3 Robotics

Quiz
•
5th - 12th Grade
10 questions
Alpha Task Code Quiz Check in

Quiz
•
9th - 12th Grade
15 questions
Fanuc Labs 1-6

Quiz
•
10th - 12th Grade
12 questions
Photoshop Review

Quiz
•
KG - University
12 questions
Finch Robot Review Quiz

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade