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 891–900 of 3,140
  1. 891
  2. 892
  3. 893
  4. 894
  5. 895
  6. 896
  7. 897
  8. 898
  9. 899
  10. 900

Question 891

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 892

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 893

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 894

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 895

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 896

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 897

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 898

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 899

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 900

Free response Unit 2: Selection and Iteration
Given a string str, if the string starts with "f" return "Fizz". If the string ends with "b" return "Buzz". If both the "f" and "b" conditions are true, return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 891 of 3,140
Page 90 of 314