Algorithms Robots

Algorithms Robots

9th - 12th Grade

7 Qs

quiz-placeholder

Similar activities

Pandas - CSV file

Pandas - CSV file

12th Grade

10 Qs

Cell Phone Vocabulary

Cell Phone Vocabulary

9th - 12th Grade

12 Qs

HARDWARE AND SOFTWARE

HARDWARE AND SOFTWARE

2nd - 10th Grade

10 Qs

Q1 M 2 - TOPIC 2 / Check your understanding

Q1 M 2 - TOPIC 2 / Check your understanding

10th Grade

10 Qs

ICT - Networks and communication

ICT - Networks and communication

9th Grade

11 Qs

4Q Week3 Review Quiz (Who missed the Quiz ONLY))

4Q Week3 Review Quiz (Who missed the Quiz ONLY))

9th Grade

10 Qs

Embed System#3

Embed System#3

10th - 12th Grade

10 Qs

LET's Check your knowledge on E-Governance & E-Commerce

LET's Check your knowledge on E-Governance & E-Commerce

10th Grade

11 Qs

Algorithms Robots

Algorithms Robots

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Charles Martinez

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

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. Which of the 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.

2.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing right. Which of the following code segments will move the robot to the gray square?

Media Image
Media Image
Media Image
Media Image

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

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.

Media Image
Media Image
Media Image
Media Image

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

A red triangle is pictured below in a grid of squares. It is currently facing upward, and can only move using the MoveTriangle procedure, shown below. The triangle can move onto white and gray squares, but not onto the black squares.
PROCEDURE MoveTriangle (numMoves, numTurns)
{ 
REPEAT
numMoves TIMES   

MOVE_FORWARD() 
}
 
REPEAT numTurns TIMES 
{   
TURN_RIGHT() 
}
}
Which of the following instructions will get the red triangle to the gray square?

 
MoveTriangle (1, 1) MoveTriangle (1, 1) MoveTriangle (3, 1) MoveTriangle (3, 0)
MoveTriangle (4, 1)
MoveTriangle (4, 0)
MoveTriangle (1, 1)
MoveTriangle (1, 3)
MoveTriangle (3, 1)
MoveTriangle (3, 0)
 
MoveTriangle (1, 1)
MoveTriangle (1, 3)
MoveTriangle (3, 3)
MoveTriangle (3, 0)

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

5. The following question uses a robot in a grid of squares. The robot is represented as a triangle,

which is initially in the bottom left square of the grid and facing right.

Which of the following shows the location of the robot after running the code segment?

Media Image
Media Image
Media Image
Media Image

6.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

8. The code 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.


REPEAT UNTIL (GoalReached ()) {

IF (CAN_MOVE (forward))

{

MOVE_FORWARD ()

}

IF (CAN_MOVE (right))

{

ROTATE_RIGHT ()

}

IF (CAN_MOVE (left))

{

ROTATE_LEFT ()

}

}


For which of the grids does the code segment NOT correctly move the robot to the gray square?

Media Image
Media Image
Media Image
Media Image

7.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

14. The figure shows a robot in a grid of squares. The robot is represented as a triangle, which is initially facing upward. The robot can move into a white or gray square but cannot move into a black region.

Consider the procedure MoveAndTurn shown. Which of the following code segments will move the robot to the gray square?

Media Image
Media Image
Media Image
Media Image

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?