Python Range() Function Quiz-8D

Python Range() Function Quiz-8D

8th Grade

5 Qs

quiz-placeholder

Similar activities

Python Introduction

Python Introduction

6th - 8th Grade

10 Qs

Kuis Fungsi HLOOKUP-2

Kuis Fungsi HLOOKUP-2

8th Grade

10 Qs

User Input in Python

User Input in Python

7th - 8th Grade

10 Qs

Intro to Python

Intro to Python

8th Grade

10 Qs

Introduction to Python Turtle

Introduction to Python Turtle

7th - 8th Grade

10 Qs

Python

Python

5th - 8th Grade

10 Qs

Python

Python

7th - 8th Grade

5 Qs

Тест на знание основ Python

Тест на знание основ Python

6th - 8th Grade

10 Qs

Python Range() Function Quiz-8D

Python Range() Function Quiz-8D

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Minu Chacko

Used 5+ times

FREE Resource

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)