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
Photoshop Review

Quiz
•
KG - University
10 questions
AP CSP Boolean Logic 6

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

Quiz
•
10th - 12th Grade
9 questions
Robot While Loop Questions

Quiz
•
9th - 12th Grade
14 questions
KUIZ ASAS ROBOTIK

Quiz
•
9th - 12th Grade
11 questions
Typing words on keyboard (colours)

Quiz
•
KG - Professional Dev...
10 questions
technology

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

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

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

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
20 questions
Scalars, Vectors & Graphs

Quiz
•
11th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
10 questions
Solving Equations Opener

Quiz
•
11th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade