
L4 Iteration
Authored by Andre Ewen
Computers
8th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the concept of repeating several functions or statements within a program a fixed or conditional amount of times called?
Iteration
Conditional loop
Fixed loop
Nested loop
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which loop will continue until a specified condition is met?
While loop
For loop
Do-while loop
Nested loop
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? no_of_times = int(input("Please enter the number to count to")) counter = 1 while counter <= no_of_times: print("Number" + str(counter)) counter += 1
Prints the numbers from 1 to the user input number
Prints the numbers from 1 to 10
Prints the numbers from 1 to 9
Prints the numbers from 1 to 11
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the else statement in a while loop?
It is executed if the while condition is met
It is executed if the while condition is not met
It is executed after the while loop is completed
It is executed before the while loop starts
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? for i in range(10): print(i)
Prints the numbers from 0 to 9
Prints the numbers from 1 to 10
Prints the numbers from 1 to 9
Prints the numbers from 0 to 10
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? message = "Hello" for char in message: print(char)
Prints each character of the string on a new line
Prints the string "Hello"
Prints the length of the string
Prints the ASCII values of the characters
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? for i in range(1, 6): print(i * i)
Prints the squares of the numbers from 1 to 5
Prints the squares of the numbers from 1 to 6
Prints the squares of the numbers from 2 to 5
Prints the squares of the numbers from 2 to 6
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Youtubers Charlie.C-J
Quiz
•
3rd - 9th Grade
10 questions
Online Sources
Quiz
•
7th - 8th Grade
9 questions
WordPad 01
Quiz
•
5th - 8th Grade
10 questions
mouse
Quiz
•
1st - 8th Grade
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
14 questions
Adobe Premiere Pro :>>
Quiz
•
8th Grade
10 questions
S2 Subject Choice Quiz
Quiz
•
8th - 10th Grade
10 questions
Contact Center Sevices
Quiz
•
7th - 10th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade