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 661–670 of 3,140
  1. 661
  2. 662
  3. 663
  4. 664
  5. 665
  6. 666
  7. 667
  8. 668
  9. 669
  10. 670

Question 661

Multiple choice Unit 1: Using Objects and Methods
A program must generate a random integer from 7 through 19, including both endpoints, with approximately…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 662

Multiple choice Unit 1: Using Objects and Methods
Which range contains all and only the possible values…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 663

Multiple choice Unit 1: Using Objects and Methods
The same random value r is used in both assignments. Which offered pair a:b…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 664

Multiple choice Unit 1: Using Objects and Methods
Over many executions, which value of prize should occur approximately twice as often as either of the other two values?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 665

Multiple choice Unit 1: Using Objects and Methods
A program must generate every integer satisfying -6 <= value < 2, with approximately equal probabilities and no…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 666

Multiple choice Unit 1: Using Objects and Methods
Which statement correctly describes hits after the loop? int hits = 0; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 667

Multiple choice Unit 1: Using Objects and Methods
For this execution only, the three calls to Math.random() return 0.125, 0.875, and 0.375, in that order. What is printed? int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 668

Multiple choice Unit 1: Using Objects and Methods
Assume the two calls act as independent draws. Over many executions, which value of gap should be the most frequent?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 669

Multiple choice Unit 1: Using Objects and Methods
Which list contains all and only the possible final values of hits? double r =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 670

Multiple choice Unit 1: Using Objects and Methods
A bonus should be awarded with probability approximately 0.75. Which condition…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 661 of 3,140
Page 67 of 314