Java Semester Test

Java Semester Test

11th Grade

35 Qs

quiz-placeholder

Similar activities

AP CSA Unit 6 Arrays

AP CSA Unit 6 Arrays

9th - 12th Grade

34 Qs

Intro to Programming Final Review

Intro to Programming Final Review

9th - 12th Grade

30 Qs

CSP Review Study Guide Final

CSP Review Study Guide Final

6th - 12th Grade

30 Qs

Arrays, Arraylists, 2D Arrays

Arrays, Arraylists, 2D Arrays

9th - 12th Grade

35 Qs

Review Arrays

Review Arrays

9th - 12th Grade

32 Qs

Arrays Unit 6 AP CSA

Arrays Unit 6 AP CSA

9th - 12th Grade

34 Qs

Arrays and Lists

Arrays and Lists

9th - 12th Grade

34 Qs

AP CSA Arrays

AP CSA Arrays

9th - 12th Grade

34 Qs

Java Semester Test

Java Semester Test

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Douglas Ray

Used 3+ times

FREE Resource

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a valid condition to go in an if statement for Karel?

ballsPresent()

frontIsClear()

leftIsBlocked()

turnLeft()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Say Karel is on a location with one tennis ball. After the following code runs, how many tennis balls will there be at that location?

0

1

2

6

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What condition should be used in this while loop to get Karel to pick up all the tennis balls on the current location?

noBallsPresent()

ballsPresent()

frontIsClear()

takeBall()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why does a programmer indent their code?

Helps show the structure of the code.

Easier for other people to understand.

A key part of good programming style!

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Say you want to write a program to have Karel put down 300 tennis balls. Which control structure would you use?

If Statement

While Loop

For Loop

Nested While Loop

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following program: (Assume the user enters ‘Florence’ then ‘Fernandez’.)

Fernandez Florence

Fernandez

Florence

FlorenceFernandez

Florence Fernandez

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following choices is a properly formed JavaScript variable name, meaning it is both legal in the JavaScript language and considered good style?

user_age

UserAge

userAge

User age

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?