Python Loops Quiz

Python Loops Quiz

1st Grade

9 Qs

quiz-placeholder

Similar activities

Story Time Trivia

Story Time Trivia

KG - University

10 Qs

Candy

Candy

KG - Professional Development

11 Qs

Hari 3 - Kuis Coding & Perkenalan AI

Hari 3 - Kuis Coding & Perkenalan AI

1st Grade - University

10 Qs

Let the Children March

Let the Children March

1st - 5th Grade

7 Qs

Cassius Quizziz-1

Cassius Quizziz-1

1st Grade

10 Qs

Being helpful

Being helpful

KG - 2nd Grade

7 Qs

Day 2 Quiz

Day 2 Quiz

1st - 12th Grade

10 Qs

PERAMBAN DAN SEARCH ENGINE

PERAMBAN DAN SEARCH ENGINE

1st - 3rd Grade

10 Qs

Python Loops Quiz

Python Loops Quiz

Assessment

Quiz

Education

1st Grade

Easy

Created by

Alexander Barus

Used 1+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a loop statement used for?

To stop the program

To repeat code

To create variables

To print text

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a while loop do?

Repeats code while a condition is true

Runs code only once

Stops the program

Creates a new variable

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a counter variable in a while loop?

To print the result

To create a new loop

To stop the loop immediately

To keep track of how many times the loop runs

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a for loop require?

A list of variables

A single number

A range of numbers

A string of text

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does a for loop increment the counter?

Automatically by 1

By 2 each time

Manually by the user

It does not increment

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an infinite loop?

A loop that never ends

A loop that runs once

A loop that stops immediately

A loop that runs in reverse

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do we use to stop an infinite loop?

A break statement

A continue statement

A return statement

A print statement

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the modulo operator do?

Finds the remainder of a division

Adds two numbers

Multiplies two numbers

Subtracts two numbers

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if the condition in a while loop is always true?

The loop will run in reverse

The loop will stop immediately

The loop will run once

The loop will never stop