Chapter 3 - for loop quiz

Chapter 3 - for loop quiz

Assessment

Interactive Video

Computers

University

Hard

Created by

Nicol Sutherland

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What are the two main purposes of a for loop?

Iteration and repetition

Addition and subtraction

Multiplication and division

Sorting and searching

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the common variable name used in for loops?

x

i

loop

var

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What function is often combined with for loops to create lists of integers?

int()

list()

str()

range()

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What will be the value of the iteration variable in the second pass of a for loop using range(3)?

3

0

2

1

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

How many times does the print statement repeat itself?

1

2

3

4