while loop

while loop

5th Grade

10 Qs

quiz-placeholder

Similar activities

Using Scratch

Using Scratch

3rd - 10th Grade

13 Qs

For loop (looper projects) (Fibonacci series)

For loop (looper projects) (Fibonacci series)

5th Grade

10 Qs

Makecode Intro.

Makecode Intro.

5th - 7th Grade

15 Qs

Microbit-Gr5

Microbit-Gr5

5th Grade

14 Qs

Computer Science

Computer Science

3rd - 12th Grade

12 Qs

G12AM_WSheet_Sprint 2.3 Iteration

G12AM_WSheet_Sprint 2.3 Iteration

5th Grade

10 Qs

code.org variables

code.org variables

3rd - 6th Grade

15 Qs

Introduction to Computer Science

Introduction to Computer Science

1st - 9th Grade

10 Qs

while loop

while loop

Assessment

Quiz

Computers

5th Grade

Hard

Created by

Tarannum Jetlearn

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a while loop?

To execute a block of code based on a random condition

To repeatedly execute a block of code as long as a specified condition is true.


To execute a block of code only once

To skip over a block of code

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop do we use when we have to repeat a code unknown number of times?


Repeat loop

For loop

Forever loop

While loop

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the role of a counter variable in a loop?

It is used to keep track of the number of iterations or the current position within the loop.

It is used to skip iterations in the loop


It is used to store the final result of the loop


It is used to define the loop condition

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What value is assigned to the index variable when button A is pressed?

0

1

4

5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is plotted on the LED grid during the loop?

The x-coordinate only.

The y-coordinate only.

Both x and y coordinates using the index value.

Random coordinates.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many LEDs will be lit when button A is pressed?

2 LEDs

4 LEDs

5 LEDs

6 LEDs

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which coordinate pattern is displayed on the LED grid as the code runs?

A diagonal line from the top-left to the bottom-right.

A vertical line.

A horizontal line.

A square pattern.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?