APCSA Unit 4 test

APCSA Unit 4 test

9th Grade

35 Qs

quiz-placeholder

Similar activities

ESS EOC Review Day 5

ESS EOC Review Day 5

Programming Quiz

Programming Quiz

Software App TSA (Sample B)

Software App TSA (Sample B)

DHS IST Midterm Review Fall 2025

DHS IST Midterm Review Fall 2025

EOC Quick Review

EOC Quick Review

Unit 4 Assessment Review

Unit 4 Assessment Review

Software/App Design TSA (Sample A)

Software/App Design TSA (Sample A)

AP CSP Vocab Part2

AP CSP Vocab Part2

APCSA Unit 4 test

APCSA Unit 4 test

Assessment

Quiz

Computers

9th Grade

Practice Problem

Hard

Created by

Thomas Wright

Used 17+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Write a method that loops until the user inputs the correct secret password or until the user fails to enter the correct password 10 times. The secret password the program should look for is the String "secret"

Assume that a Scanner object called input has been correctly initialized.

Media Image
Media Image
Media Image
Media Image

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What would the method call myMethod("Karel The Dog", 'e') return?

1

2

3

4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What kind of error would the method call myMethod("Frog") cause?

Compile Time Error: String index out of range

Runtime Error: String index out of range

Compile Time Error: Unexpected return value

Runtime Error: Syntax Error in method definition

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the call to the method funWithNumbers(314159) print to the screen?

314159

951413

314

951

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does the call to the method someMethod(3,1) output?

9

12

11

10

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Write a method that will ask for user input until user inputs the String “no”. Allow the user to input any capitalization of the String “no” (“no”, “No”, “NO”, “nO”) Also, have the method return the number of loops.

Assume that a Scanner object input has already been created.

Media Image
Media Image
Media Image
Media Image

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the call to method patternGrid(3,4,'#') print?

####

####

####

###

###

###

####

####

####

####

This code will error.

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers