for and while loops level 2
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Brian Miller
Used 6+ times
FREE Resource
12 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
The x variable in the FOR LOOP starts at what value
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
The x variable in the FOR LOOP ends at what value?
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
The x variable in the FOR LOOP increments by how much after each iteration of the loop?
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
The variable s is initialized before the FOR LOOP starts. What value is the starting value for s?
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The variable s is initialized before the FOR LOOP starts and is incremented in the loop. What LINE in the given code INITIALIZES s?
int s = 0;
for(int x=0; x<=30; x=x+10){
s=s+x;
System.out.println(x+" "+s);
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The variable s is initialized before the FOR LOOP starts and is incremented in the loop. What LINE in the given code INCREMENTS s?
int s= 0;
for(int x=0; x<=30; x=x+10){
s=s+x;
System.out.println(x+" "+s);
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the FIRST line of the output produced by this code?
0 10
0 0
x s
10 30
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
12 questions
Tin học 2
Quiz
•
11th Grade
15 questions
Technology in medicine
Quiz
•
10th Grade
12 questions
Kiểm tra giữa kì 2 lớp 7
Quiz
•
9th Grade
15 questions
Emtech Quiz 4
Quiz
•
11th Grade
10 questions
Evaluación Primer Trimestre 3
Quiz
•
12th Grade
13 questions
Fun Games :) Fastest Fingers First.
Quiz
•
10th Grade - Professi...
10 questions
Virtual Memory
Quiz
•
11th Grade
10 questions
TIN HỌC 10 - BÀI 21
Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade