Iteration Quiz review part 2

Iteration Quiz review part 2

9th - 12th Grade

13 Qs

quiz-placeholder

Similar activities

2.1 Algorithms CW1-4

2.1 Algorithms CW1-4

10th Grade

10 Qs

Visual Basic I

Visual Basic I

10th - 11th Grade

10 Qs

Logical Operators Quiz

Logical Operators Quiz

10th Grade

10 Qs

VB Variables

VB Variables

11th Grade

10 Qs

Eval. 1BIM -  1ro B

Eval. 1BIM - 1ro B

7th Grade - University

15 Qs

Python Quiz for Grade 10 Students

Python Quiz for Grade 10 Students

10th Grade

10 Qs

Python

Python

6th - 10th Grade

17 Qs

Big Idea 3

Big Idea 3

9th - 12th Grade

15 Qs

Iteration Quiz review part 2

Iteration Quiz review part 2

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

David Guy

Used 25+ times

FREE Resource

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

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

Media Image

"appl"

"apple"

"elppa"

"lppa"

Nothing is returned due to a run-time error.

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

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  StringIndexOutOfBoundsExceptionStringIndexOutOfBoundsException   is thrown.

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Consider the following code segment. Assume that  num3\ >\ num2\ >\ 0.  



Which of the following best describes the contents of  num1num1  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

Media Image

Consider the following code segment.


Which of the following code segments will produce the same output as the code segment above?

Media Image
Media Image
Media Image
Media Image
Media Image

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

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

Media Image

I only

II only

I and II only

I and III only

I, II and III

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?