Introductory Computer Science Multiple-Choice Quiz
Explore how computers represent information and follow instructions. Work up to binary numbers, search, and short traces of conditions and loops.
Ages 12+ · beginner computing learners and classroom reviewWhat is a single binary digit, such as 0 or 1, called?
Ready to play?
Open at Step 3 with every question loaded. Play solo, host live, or customize your game.
Play & Customize GameQuestions by ladder level
What is a single binary digit, such as 0 or 1, called?
- A bit
- A byte
- A pixel
- A character
Show answer and explanation
Correct answer: A. A bit
A bit is one binary digit. A byte contains eight bits.
Which device sends letters or symbols to a computer when you press its keys?
- Speaker
- Projector
- Keyboard
- Monitor
Show answer and explanation
Correct answer: C. Keyboard
A keyboard sends input to a computer. Projectors, speakers, and ordinary monitors present output.
Which description best fits an algorithm for completing a task?
- A list of goals with the steps left unspecified
- A precise series of steps that can be followed
- A collection of unexpected program results
- A picture of the computer running the task
Show answer and explanation
Correct answer: B. A precise series of steps that can be followed
An algorithm gives a procedure for reaching a result. It can be described clearly before it is implemented in code.
A game needs to store its current score and update it when points are earned. What can hold that changing value?
- A program's title
- A comment
- A fixed numeric literal
- A variable
Show answer and explanation
Correct answer: D. A variable
A variable lets the program refer to the current value by name and assign a new value when the score changes.
How many different patterns can be made from exactly two bits?
- Two
- Four
- Three
- Eight
Show answer and explanation
Correct answer: B. Four
The two positions can each hold 0 or 1. The possible patterns are 00, 01, 10, and 11.
A program checks whether two bus stops are connected by routes. Which simplified model keeps the information needed for this job?
- Stops and route connections between them
- Street names and landmarks without bus stops
- The number and fuel capacity of buses
- Bus stop names in alphabetical order
Show answer and explanation
Correct answer: A. Stops and route connections between them
An abstraction keeps the details that matter for a task. For this task, the program needs the stops and their connections.
A classroom check-in requires an ID card AND a signed form. When does this condition become true?
- When neither item is present
- When only the ID card is present
- When only the signed form is present
- When both items are present
Show answer and explanation
Correct answer: D. When both items are present
A logical AND yields true only when both of its conditions are true.
A program starts with x equal to 4. It sets x to x + 2, then sets x to x × 3. What value does x hold at the end?
- 12
- 14
- 18
- 6
Show answer and explanation
Correct answer: C. 18
The first update changes x from 4 to 6. The second multiplies the current value 6 by 3, giving 18.
A program displays LONG when the time is at least 30 minutes. Otherwise it displays SHORT. What appears at exactly 30 minutes?
- LONG only
- SHORT only
- Both LONG and SHORT
- Neither message
Show answer and explanation
Correct answer: A. LONG only
At least 30 includes exactly 30. The first branch runs, and the otherwise branch is skipped.
A number starts at 2. A loop repeats the instruction «Double the current number, then add 1» exactly three times. What is the final number?
- 24
- 11
- 17
- 23
Show answer and explanation
Correct answer: D. 23
The first repeat produces 5, the second produces 11, and the third produces 23.
What decimal number does the binary number 1011 represent?
- 13
- 9
- 11
- 7
Show answer and explanation
Correct answer: C. 11
From right to left, the bit positions are worth 1, 2, 4, and 8. The 1 bits turn on 8, 2, and 1, which total 11.
A linear search reads [6, 12, 7, 11, 7, 2] from left to right and stops when it finds 7. How many values does it inspect?
- Two
- Three
- Four
- Five
Show answer and explanation
Correct answer: B. Three
It checks 6, then 12, then the first 7. The later 7 is never reached.
Binary search is looking for 18 in the sorted list [3, 7, 9, 12, 16, 18, 23]. It has just checked the middle value, 12. What is the remaining search range after this comparison?
- [16, 18]
- [3, 7, 9]
- [12, 16, 18, 23]
- [16, 18, 23]
Show answer and explanation
Correct answer: D. [16, 18, 23]
The target 18 is larger than 12. Since the list is sorted, 12 and every value to its left can be ruled out.
A program starts a total at 0 and reads [2, 5, 8, 1]. For each value, it adds the value if it is even, then adds 1 regardless. What is the final total?
- 14
- 10
- 13
- 16
Show answer and explanation
Correct answer: A. 14
The even numbers add 2 + 8, and all four passes add 1 each. The total is 10 + 4 = 14.
For each x in [1, 3], a program checks every y in [2, 4, 6]. It counts a pair only when y is greater than x. How many pairs does it count?
- Six
- Four
- Five
- Three
Show answer and explanation
Correct answer: C. Five
All three y values are greater than 1. Only 4 and 6 are greater than 3. That gives 3 + 2 = 5 pairs.