Quiz 13 - For Loops

Quiz
•
Computers
•
11th Grade
•
Easy
Casey Devet
Used 93+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
In a for loop, which of the following is NOT included in the parentheses after the "for" keyword?
updating the control variable
loop body
initializing the control variable
test condition
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
In the given for loop, when will the instruction "int x = 1" be executed?
once, at the beginning of the loop
once, at the end of the loop
after every loop iteration
before every loop iteration
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
In the given for loop, when will the test "x <= 10" be executed?
once, at the beginning of the loop
once, at the end of the loop
after every loop iteration
before every loop iteration
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
In the given for loop, when will the instruction "x++" be executed?
once, at the beginning of the loop
once, at the end of the loop
after every loop iteration
before every loop iteration
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
How many iterations will this for loop execute?
9
10
11
infinitely many
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
For loops can be contained in for loops
True
False
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
This for loop is supposed to print the numbers from 1 to 100, but isn't working. What needs to be corrected?
count should start with the value 0
Use count-- instead of count++
Use > instead of >=
Use <= instead of >=
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
CP M4 Repetition & Loops

Quiz
•
9th - 12th Grade
5 questions
AP Computer Science A Unit 4 Section 4 (Nested Loops)

Quiz
•
10th - 12th Grade
10 questions
Quiz 16 - Arrays and Loops

Quiz
•
11th Grade
12 questions
Intro to Scratch 2

Quiz
•
KG - University
14 questions
9.1.5 - Starter Quiz

Quiz
•
7th - 11th Grade
10 questions
S2 Sphero Knowledge Check 2

Quiz
•
11th Grade
10 questions
Python Flow Control

Quiz
•
9th - 12th Grade
11 questions
Basic Programming Constructs

Quiz
•
11th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade