Verityprep
Question Bank

AP® Computer Science A FRQ Practice: Free-Response Questions with Solutions

Work through AP Computer Science A free-response 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 101–110 of 329
  1. 101
  2. 102
  3. 103
  4. 104
  5. 105
  6. 106
  7. 107
  8. 108
  9. 109
  10. 110

Question 101

Free response Unit 2: Selection and Iteration
The number 6 is a truly great number. Given two int values, a and b, return true if either one is 6. Or if their sum or difference is 6. Note: the function…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 102

Free response Unit 2: Selection and Iteration
Given a number n, return true if n is in the range 1..10, inclusive. Unless outsideMode is true, in which case return true if the number is less or equal to 1,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 103

Free response Unit 2: Selection and Iteration
We'll say a number is special if it is a multiple of 11 or if it is one more than a multiple of 11. Return true if the given non-negative number is special. Use…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 104

Free response Unit 2: Selection and Iteration
Return true if the given non-negative number is 1 or 2 more than a multiple of 20. See also: Introduction to Mod…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 105

Free response Unit 2: Selection and Iteration
Return true if the given non-negative number is a multiple of 3 or 5, but not both. Use the % "mod" operator -- see…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 106

Free response Unit 2: Selection and Iteration
Return true if the given non-negative number is 1 or 2 less than a multiple of 20. So for example 38 and 39 return true, but 40 returns false. See…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 107

Free response Unit 2: Selection and Iteration
Given a non-negative number num, return true if num is within 2 of a multiple of 10. Note: (a % b) is the remainder of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 108

Free response Unit 2: Selection and Iteration
Given 2 ints, a and b, return their sum. However, "teen" values in the range 13..19 inclusive, are extra lucky. So if either value is a teen,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 109

Free response Unit 2: Selection and Iteration
Your cell phone rings. Return true if you should answer it. Normally you answer, except in the morning you only answer if it is your mom calling. In all cases,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 110

Free response Unit 2: Selection and Iteration
We are having a party with amounts of tea and candy. Return the int outcome of the party encoded as 0=bad, 1=good, or 2=great. A party is good (1) if both tea…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 101 of 329
Page 11 of 33