APCSA Unit 4 test

Quiz
•
Computers
•
9th Grade
•
Hard
Thomas Wright
Used 16+ times
FREE Resource
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.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would the method call myMethod("Karel The Dog", 'e') return?
1
2
3
4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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
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.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the call to method patternGrid(3,4,'#') print?
####
####
####
###
###
###
####
####
####
####
This code will error.
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
REVISÃO PYTHON

Quiz
•
9th - 12th Grade
40 questions
Python

Quiz
•
9th - 11th Grade
40 questions
7th Seoul - 2nd Cycle Exam

Quiz
•
7th Grade - University
30 questions
PBO - XII RPL (SMKN 1 Cisarua)

Quiz
•
1st - 10th Grade
30 questions
PBO - XI RPL (SMKN 1 Cisarua)

Quiz
•
1st - 10th Grade
40 questions
Python

Quiz
•
9th Grade
31 questions
Python Unit 02 - Libraries and Variables

Quiz
•
6th - 9th Grade
40 questions
UD2 Condicionales y bucles

Quiz
•
1st - 10th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade