Search Header Logo

Review G8

Authored by Thanh Lê

Computers

6th - 8th Grade

Used 2+ times

Review G8
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

 Which loop is typically used when you know exactly how many times you want to repeat a code block?

While Loop

For loop

If statement

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop is typically used when you want to repeat a code block until a certain condition is met, but you don't know how many times it will need to repeat?

While Loop

For loop

If statement

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?


for i in range(5):
    print(i)

5

1 2 3 4

0 1 2 3 4

error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if the condition in a While loop is never met?

The loop will run once

The loop will never run

An infinite loop will occur

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which module provides functions for generating random numbers in Python?

random

math

randint

turtle

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you print only odd numbers from 1 to 20 using a "for" loop?

for i in range(1, 20, 2):

for i in range(1, 21, 1):

for i in range(1, 2, 20):

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

 What is the primary purpose of the Turtle module in Python?

Performing mathematical calculations

Generating random numbers

Creating visual graphics

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?