Quiz 2.2: Advanced Loop Structures: Date Student Class/Teacher

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Date Student Class/Teacher

Course 40521: Introduction to Python, Unit 3

Quiz 2.2: Advanced Loop Structures


1. Which type of statement should you use as a placeholder for future function code?

 A. break
 B. continue
 C. pass
 D. place

2. What type of loop should you use to repeat a code process as long as a condition resolves as `True`?

 A. compound
 B. for
 C. nested
 D. while

3. What type of loop should you use to iterate over the elements of a simple table (two-dimensional
list)?

 A. compound
 B. for
 C. nested
 D. while

4. True or False: An infinite loop is a loop that runs until the value returned by the loop condition is
False.

 A. True
 B. False

Page 1 of 1

You might also like