Loops with Java
Quiz by Carol
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
6 questions
Show answers
- Q1Note: the println() function prints out a line of text with the value that you pass to it - so if you say println("Hi"), it will output: Hi Consider the following code: var i = 0; while (i < 3) { println("hi"); i++; } What does the code output?hi hi hi30s
- Q2Consider the following code: var i = 0; while (i < 3) { println("hi"); i++; } println("bye"); What does the code output?hi hi hi bye30s
- Q3Consider the following code: var i = 0; while (i < 0) { println("hi"); } What does the code output?no output30s
- Q4Consider the following code: var x = 3; var i = 0; while (i < 3) { x += 1; i += 1; } println(x); What does the code output?630s
- Q5Consider the following code: var i = 3; while (i < 6) { println(i); i += 1; } What is the output?3 4 530s
- Q6Consider the following code: var i = 0; while (i < 3) { println(i); i++; } What does the code output?0 1 230s