← AP CSP

Basics: AP CSP practice

Variables, data types, operators, input and output. 4 questions in the style of the AP CSP exam.

Sample questions

What is displayed when this code segment runs? In AP pseudocode, DISPLAY shows a value followed by a space, so type every displayed value on one line, separated by single spaces.

a ← 10
b ← 3
c ← a MOD b
a ← b
b ← c + a
DISPLAY(a)
DISPLAY(b)
DISPLAY(c)