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
Python Programming End of Unit Assessment

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

Quiz
•
6th - 9th Grade
30 questions
PBO - XII RPL (SMKN 1 Cisarua)

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

Quiz
•
1st - 10th Grade
30 questions
Python Beginner

Quiz
•
6th - 12th Grade
35 questions
Spring Final Review Part II

Quiz
•
9th - 12th Grade
37 questions
AP CS A Midterm Review

Quiz
•
9th - 12th Grade
40 questions
Python

Quiz
•
9th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade