
Iteration Quiz review part 2
Authored by David Guy
Computers
9th - 12th Grade
Used 25+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider the following method.
Which of the following method calls will cause "0 10 " to be printed?
printSome(0,20)
printSome(5,10)
printSome(10,5)
printSome(20,5)
printSome(25,5)
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
"appl"
"apple"
"elppa"
"lppa"
Nothing is returned due to a run-time error.
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider the following method.
What, if anything, is returned by the method call abMethod("sing the song", "ng")?
"si"
"si the so"
"si the song"
"sig the sog"
Nothing is returned because a is thrown.
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider the following code segment. Assume that
Which of the following best describes the contents of as a result of executing the code segment?
The product of num2 and num3
The product of num2 and num3-1
The sum of num2 and num3
The sum of all integers from num2 to num3, inclusive
The sum of all integers from num2 to num3-1, inclusive
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider the following code segment.
Which of the following code segments will produce the same output as the code segment above?
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider the following code segment. What is printed as a result of executing the code segment?
6
10
12
15
Nothing is printed due to an infinite loop.
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
I only
II only
I and II only
I and III only
I, II and III
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?