Search Header Logo

Python Range() Function Quiz-8D

Authored by Minu Chacko

Computers

8th Grade

Used 7+ times

Python Range() Function Quiz-8D
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax of the range() function?

range(stop, start, step)

range(stop, step, start)

range(start, stop, step)

range(start, stop)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default start value of the range() function if not specified?

-1

1

0

10

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of range(1, 10)?

It will output a sequence of numbers from 0 to 9.

It will output a sequence of even numbers from 1 to 10.

It will output a sequence of numbers from 1 to 10.

It will output a sequence of numbers from 1 to 9.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of range(10)?

1, 2, 3, 4, 5, 6, 7, 8, 9, 10

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

1, 2, 3, 4, 5, 6, 7, 8, 9

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Write a Python code to print all the even numbers between 1 and 10 using the range() function.

for num in range(2, 10, 2): print(num)

for num in range(1, 11, 2): print(num)

for num in range(1, 10, 2): print(num)

for num in range(2, 11, 2): print(num)

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?