Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
73 views

Python 3 Loops - Print - Quizizz

This document is a 50 question quiz on Python loops and iteration. The questions cover topics like the definition of iteration, the different loop types (for, while), loop conditions and syntax (while something is true, for i in range(x)), and using loops and conditional logic to print output. The goal is to test the learner's understanding of how loops work in Python and how they can be used to repeat actions and print text.

Uploaded by

Bunny starboy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Python 3 Loops - Print - Quizizz

This document is a 50 question quiz on Python loops and iteration. The questions cover topics like the definition of iteration, the different loop types (for, while), loop conditions and syntax (while something is true, for i in range(x)), and using loops and conditional logic to print output. The goal is to test the learner's understanding of how loops work in Python and how they can be used to repeat actions and print text.

Uploaded by

Bunny starboy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

7/12/2021 Python 3 Loops | Print - Quizizz

NAME :

CLASS :
Python 3 Loops
DATE :
50 Questions

1. In programming, what is iteration?

a) The repetition of steps within a program b) The order in which instructions are carried
out

c) A decision point in a program d) Testing a program to make sure it works

2. Why is iteration important?

a) It determines the order in which b) It allows code to be simplified by removing


instructions are carried out duplicated steps
c) It allows multiple paths through a program d) It ensures the code works correctly

3. Which two statements are used to implement iteration?

a) IF and WHILE b) ELSE and WHILE

c) FOR and WHILE d) IF and ELSE

4. Which type of loop iterates until instructed otherwise?

a) FOR loop b) A count-controlled loop

c) Repeat-once loop
d) WHILE loop

5. The condition for a while loop to continue could include

which of the following?

a) While something equals something b) While something is greater than something


c) While something is True d) All of these

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 1/15
7/12/2021 Python 3 Loops | Print - Quizizz

6. Which of the following symbols is used in Python to mean

"Equal to"?

a) = b) !=
c) == d) >=

7. Which of the following symbols is used in Python to mean

"Not equal to"?


a) == b) !=

c) <> d) ><

8. Which of the following symbols is used in Python to mean

"Greater than or equal to"?

a) <= b) >>
c) >= d) =>

9.

a) 5
b) 4

4
3

3
2

2
1

1 0
c) 5  4  3  2  1 d) 4  3  2  1  0

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 2/15
7/12/2021 Python 3 Loops | Print - Quizizz

10.

a) 5
b) 4

4
3

3
2

2
1

1 0
c) 5  4  3  2  1 d) 4  3  2  1  0

11.

a) 5
b) 5  4  3  2  1
4

1
c) 4
d) 4  3  2  1  0
3

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 3/15
7/12/2021 Python 3 Loops | Print - Quizizz

12.

a) 10  8  6  4  2 b) 10

c) 2  4  6  8  10 d) 10  9  8  7  6  5  4  3  2  1

13.

a) 12  9  6  3  0 b) 0  3  6  9  12

c) 9  6  3  0 d) 0  3  6  9

14.

a) 0  5  10 b) 5  10

c) 0  5  10  15  20  25  30  35  40  45  50  55  60 d) 12  7  2
 65  70  75  80  85  90  95  100  105  110
 115  120  125  130  135  140......etc

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 4/15
7/12/2021 Python 3 Loops | Print - Quizizz

15.

a) 12  17   22 b) 5

c) 12 d) 5  10

16.

a) Hello world! b) Hello world

c) Hello world!
d) Error
Hello world!

Hello world!

Hello world!

Hello world!

Hello world!

......(repeated continuously)

17.

a) Hello world!
b) Hello world!
Hello world!

Hello world!

Hello world!

Hello world!

Hello world!

(repeated continuously)

c) Hello world!
d) Error
break              

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 5/15
7/12/2021 Python 3 Loops | Print - Quizizz

18. Which of the following symbols is used in Python to mean

"Less than or equal to"?

a) << b) =<

c) <= d) !=

19.

a) Welcome b) Try again!


c) Error d) Enter your password

20.

a) Hello world! b) Error

c) Hello world!
d) Hello world!
False Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
(repeated continuously)

21. To repeat a fixed number of times use a

a) while loop b) for loop

c) if loop d) indentation

22. To repeat until a particular condition is true use

a) while loop b) for loop

c) if loop d) indentation
https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 6/15
7/12/2021 Python 3 Loops | Print - Quizizz

23. Data type that can only be true or false

a) int b) string
c) bool d) float

24. The character that must be at the end of the line for if,

while, for etc.

a) : b) ;

c) . d) ,

25. To solve a problem that requires the user to enter 10

numbers would use what type of iteration?

a) While loop b) For loop

c) Variable d) Selection

26. In a Python program, what would be the iteration variable


(looping variable) in the FOR LOOP code?

a) n b) num

c) value d) i

27. In a Python program, what would be the iteration variable


(looping variable) in the WHILE LOOP code?

a) w b) y

c) z d) i

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 7/15
7/12/2021 Python 3 Loops | Print - Quizizz

28. In a Python program, what would be the starting value in


the FOR LOOP code?

a) 100 b) 10

c) 5 d) 20

29. In a Python program, what would be the starting value in


the FOR LOOP code?

a) 25 b) 4

c) 1 d) 0

30. In a Python program, what would be the starting value in


the WHILE LOOP code?

a) 20 b) 5

c) 2 d) 15

31. In a Python program, what would be the starting value in


the WHILE LOOP code?

a) 50 b) 3

c) 5 d) 10

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 8/15
7/12/2021 Python 3 Loops | Print - Quizizz

32. In a Python program, what would be the ending value in


the WHILE LOOP code?

a) 0 b) 5

c) 2 d) 20

33. In a Python program, what would be the ending value in


the WHILE LOOP code?

a) 5 b) 50

c) 10 d) 3

34. In a Python program, what would be the increment value


for the looping variable in the WHILE LOOP code?

a) 5 b) 3

c) -5 d) 1

In a Python program, what would be the ending value in


35. the FOR LOOP code?

a) 15 b) 1

c) 10 d) 100

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 9/15
7/12/2021 Python 3 Loops | Print - Quizizz

36. In a Python program, what would be the increment value


for the looping variable in the FOR LOOP code?

a) 15 b) 1

c) 3 d) 5

37. In a Python program, what would be the increment value


for the looping variable in the WHILE LOOP code?

a) 30 b) 1
c) -3 d) -10

38. In a Python program, what would be the increment value


for the looping variable in the FOR LOOP code?

a) -100 b) 1

c) 5 d) -5

39. In a Python program, how many iterations(loops) will


occur for the FOR LOOP code?

a) 1 b) 10

c) 9 d) 8

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 10/15
7/12/2021 Python 3 Loops | Print - Quizizz

40. In a Python program, how many outputs will occur for the
snippet of code?

a) 15 b) 3

c) 6 d) 5

41. In a Python program, how many outputs will occur for the
snippet of code?

a) 5 b) 2

c) 8 d) 4

42. Loop executed a fixed number of times with a built-in-

counter (creating a counter variable is unnecessary).

a) While loop b) For loop

c) Repeat loop d) If...else

43. Consider the loop control structure in programming. Which

term describes a loop that continues repeating without a


terminating (ending) condition?

a) Conditional Loop b) Unlimited Loop

c) Sequence Loop d) Infinite Loop

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 11/15
7/12/2021 Python 3 Loops | Print - Quizizz

44. What will print?

a) 1
b) 1

2
2

11 21

c) 1
d) 1

2
2

3
3

11 21

45. What will print to the screen?

a) 0 b) 2

c) 3 d) 1

46. What will print to the screen in this code?

a) 18 b) -25

c) -10 d) -15

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 12/15
7/12/2021 Python 3 Loops | Print - Quizizz

47. Which of the following will print:

a) for i in range(1, 5):   


b) for i in range(1, 5):   

print(str(i) * 5) print("i" * i)

c) for i in range(1, 6):   


d) for i in range(1, 6):   

print("i" * i) print(str(i) * i)

48. What is the output from this code snippet?

a) 1, 0, 1, 1, 0, 1, 1, 1, 1, 1 b) 0, 1, 1, 0, 1, 1, 0, 1, 1, 0

c) 0, 1, 1, 0, 1 d) 0, 1, 1, 1, 1, 1, 0, 1, 1, 0

49. What is the output from this code snippet?

a) 3 b) 2

c) 1 d) 4

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 13/15
7/12/2021 Python 3 Loops | Print - Quizizz

50. What is the output from this code snippet?

a) 5 b) 4

c) 3 d) 2

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 14/15
7/12/2021 Python 3 Loops | Print - Quizizz

Answer Key
1. a 14. c 27. b 40. d
2. b 15. c 28. c 41. d
3. c 16. c 29. d 42. b
4. d 17. b 30. a 43. d
5. d 18. c 31. b 44. a
6. c 19. b 32. a 45. c
7. b 20. a 33. b 46. d
8. c 21. b 34. c 47. d
9. b 22. a 35. a 48. b
10. a 23. c 36. b 49. b
11. b 24. a 37. c 50. a
12. a 25. b 38. d
13. d 26. a 39. c

https://quizizz.com/print/quiz/5f695f9ec23b50001b48d212 15/15

You might also like