Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice questions unit by unit, then check each answer against a worked solution.

Free · no sign-up Open questions need no account. Sign up or log in to open the rest.

Questions 621–630 of 3,140
  1. 621
  2. 622
  3. 623
  4. 624
  5. 625
  6. 626
  7. 627
  8. 628
  9. 629
  10. 630

Question 621

Multiple choice Unit 1: Using Objects and Methods
Which statement uses the variables below to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 622

Multiple choice Unit 1: Using Objects and Methods
What visible output does this statement produce? Ignore the final…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 623

Multiple choice Unit 1: Using Objects and Methods
An audio clip lasts 2 minutes and 45 seconds. The code below incorrectly stores 2.0 in duration. Which replacement for the last line correctly…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 624

Multiple choice Unit 1: Using Objects and Methods
A shipping program packs items into boxes that each hold capacity items. Both variables are int, with 1 <= items <= 1000 and 1…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 625

Multiple choice Unit 1: Using Objects and Methods
The following code appears inside a method. Which outcome is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 626

Multiple choice Unit 1: Using Objects and Methods
An order contains 4 items costing 7 credits each, plus a single shipping charge of 3 credits. The program prints 49 instead of the intended total 31. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 627

Multiple choice Unit 1: Using Objects and Methods
The int variables completed and total satisfy 0 <= completed <= total <= 1000 and total > 0. A progress indicator should store the percentage…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 628

Multiple choice Unit 1: Using Objects and Methods
A temperature converter uses the formula Fahrenheit = (9/5) × Celsius + 32, where the fraction represents real-number…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 629

Multiple choice Unit 1: Using Objects and Methods
A display should rotate three stored counts: red receives the original blue count, blue receives the original green count, and green receives the original red…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 630

Multiple choice Unit 1: Using Objects and Methods
The int variable badge is a four-digit positive number (1000 through 9999). A machine removes the hundreds digit and keeps the other digits…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 621 of 3,140
Page 63 of 314