Back to Challenge Set 3

Question Set 1

Difficulty  

divider

What This Is

Five exam-style questions covering everything from Activity 1.1 through 1.9. There will be one of these at the end of every block, all year, and each is cumulative — later sets still contain questions about this material.

The AP exam gives you 70 questions in 120 minutes. That is 1 minute 43 seconds each, including the ones with code to read. Almost nobody is fast enough at first, and the only fix is starting early.

How to Do This One

  • Set a timer for 9 minutes before you start.
  • When the timer ends, stop. Mark anything unfinished as unfinished — that is real information, not a failure.
  • Work them out. Do not run the code. On exam day there is no computer.
  • For each question, also write sure or unsure. This is graded on completion, so an honest unsure costs you nothing and tells us both where to look.

Guessing beats leaving it blank. There is no penalty for a wrong answer on the AP exam, so a blank is a guaranteed zero where a guess is not.


The Questions

Four of these have exactly one correct answer. One of them asks you to select all that apply — the real exam has eight questions like that, and they are the ones students lose points on by stopping at the first true statement.


Question 1

What does the following code display?

Question 1
int a = 7;
int b = 3;
Console.WriteLine("Score: " + a + b);
  1. Score: 10
  2. Score: 73
  3. Score: 7 + 3
  4. This does not compile.

Question 2

What value is displayed?

Question 2
int result = 2 + 6 / 2;
Console.WriteLine(result);
  1. 4
  2. 5
  3. 8
  4. 3.5

Question 3

A jar holds exactly 7 marbles. You have 30 marbles and fill as many jars as you can. Which expression gives the number of marbles left over?

  1. 30 / 7
  2. 30 % 7
  3. 30 - 7
  4. 7 % 30

Question 4 — Select all that apply

Which of the following are true about the value that Console.ReadLine() returns?

  1. It is text, even when the user types only digits.
  2. It can be used with * without parsing, and the program still compiles.
  3. It can be used with + to join it with another string, and the program still compiles.
  4. It is lost unless it is stored in a variable.

Question 5

The following is written in AP exam notation. What does it display?

Question 5
a ← 4
b ← 9
DISPLAY(b MOD a)
  1. 1
  2. 2
  3. 2.25
  4. 4

Question 6 — Data and Impact

A single byte can represent how many different values?

  • (A) 8
  • (B) 16
  • (C) 256
  • (D) 1024

Submit

  • Your answer to each question, with sure or unsure
  • Whether you finished inside 9 minutes, and if not, how far you got
  • One sentence: which question took you longest, and what slowed you down?

This is graded on completion, not accuracy. A thoughtful wrong answer earns the same as a right one. What is being built here is speed and stamina, and both require being allowed to get things wrong cheaply.

Start the Timer