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
12 questions
Computer Science Level 1 - Blocks with VEXcode VR Course Unit 2

Quiz
•
5th - 12th Grade
7 questions
Turtle Programming - Functions Review

Quiz
•
9th - 12th Grade
11 questions
Introduction to Robotics

Quiz
•
9th - 12th Grade
10 questions
EV3 Level 2 Quiz

Quiz
•
7th - 12th Grade
7 questions
Algorithms Robots

Quiz
•
9th - 12th Grade
15 questions
Bebras 2014

Quiz
•
7th - 12th Grade
15 questions
Bebras A 2014

Quiz
•
7th - 12th Grade
10 questions
Chapter 4 - Latihan

Quiz
•
1st - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade