Question bank
254 questions so far. 162 are checked for you: your code is run against tests, or your trace table is compared with one made by running the code (22 of the trace tables also ask one written question you mark yourself). 92 are written answers you mark yourself against the marking points.219 questions in Java so far. 18 are checked for you: your trace table is compared with one made by running the code (9 of the trace tables also ask one written question you mark yourself). 109 are code questions: Java answers can't run here yet, so they are not checked for you. 92 are written answers you mark yourself against the marking points.
Ready for a whole paper? Sit a practice paper, made from these questions.
254 of 254 questions
Name the main components of a CPU and state what each one does
- P1 a1 cpu registersShort answer●●●●●
Explain what cache memory is for and what a cache hit and a cache miss mean
- P1 a1 cache memoryShort answer●●●●●
Describe the fetch, decode and execute cycle step by step
- P1 a1 fetch decode executeShort answer●●●●●
Explain pipelining and how overlapping instruction stages raises throughput
- P1 a1 pipeliningShort answer●●●●●
Compare internal and external secondary storage types including HDD, SSD, optical, flash and network attached storage
- P1 a1 storage choiceShort answer●●●●●
Convert between denary, binary and hexadecimal
- P1 a1 binary hexShort answer●●●●●
Explain how integers are stored, including a representation for negative numbers
- P1 a1 twos complementShort answer●●●●●
Explain how a bitmap image is stored, and how resolution and colour depth affect file size
- P1 a1 bitmap sizeShort answer●●●●●
Write the Boolean expression for a described condition
- P1 a1 greenhouse logicShort answer●●●●●
Explain how the operating system allocates and protects memory between processes
- P1 a1 memory protectionShort answer●●●●●
Compare scheduling approaches such as round robin, priority and first come first served
- P1 a1 round robinShort answer●●●●●
Compare polling and interrupts as ways for hardware to get the processor's attention
- P1 a1 interruptsShort answer●●●●●
Compare interpreters and compilers on error detection, translation time, execution speed and portability
- P1 a1 compiler or interpreterShort answer●●●●●
Explain what bytecode is and how a virtual machine executes it
- P1 a1 bytecode jitShort answer●●●●●
State the function of a router, switch, modem, gateway, network interface card, wireless access point and firewall
- P1 a2 school devicesShort answer●●●●●
Compare TCP and UDP and say when each is the right transport protocol
- P1 a2 tcp or udpShort answer●●●●●
Name the four layers of the TCP/IP model and state what each is responsible for
- P1 a2 tcpip layersShort answer●●●●●
Trace a piece of data down and back up the TCP/IP layers, describing encapsulation
- P1 a2 encapsulationShort answer●●●●●
Describe common network topologies including star, mesh and hybrid
- P1 a2 star or meshShort answer●●●●●
Describe how a DNS lookup resolves a domain name to an IP address
- P1 a2 dns lookupShort answer●●●●●
Interpret CIDR notation to identify a network range
- P1 a2 cidr subnetShort answer●●●●●
Explain what an IP address is and how it differs from a MAC address
- P1 a2 ip mac natShort answer●●●●●
Explain packet switching and what a packet contains
- P1 a2 packet switchingShort answer●●●●●
Explain what a firewall does and where it sits in a network
- P1 a2 firewall limitsShort answer●●●●●
Describe common network attacks including DoS and DDoS, man in the middle, phishing, malware, SQL injection and cross-site scripting
- P1 a2 phishing layersShort answer●●●●●
Explain what encryption does and distinguish plaintext from ciphertext
- P1 a2 symmetric asymmetricShort answer●●●●●
Explain what a primary key is and why every table needs one
- P1 a3 library keysShort answer●●●●●
- P1 case trip keysShort answer●●●●●
Identify one-to-one, one-to-many and many-to-many relationships in a scenario
- P1 a3 bike share relationshipsShort answer●●●●●
Describe the data anomalies that poor design causes on insert, update and delete
- P1 a3 drama club anomaliesShort answer●●●●●
Read an entity relationship diagram and state the entities, attributes and relationships it describes
- P1 a3 music school designShort answer●●●●●
Choose appropriate SQL data types such as INTEGER, REAL, BOOLEAN, CHAR, VARCHAR and DATE for given attributes
- P1 a3 weather data typesShort answer●●●●●
Identify partial and transitive dependencies in a table
- P1 a3 cafe normaliseShort answer●●●●●
Write a single-table SELECT query using WHERE, ORDER BY and DISTINCT
- P1 a3 library select joinShort answer●●●●●
Write INSERT, UPDATE and DELETE statements, and explain the consequence of omitting a WHERE clause
- P1 a3 library updateShort answer●●●●●
Use the aggregate functions COUNT, SUM, AVG, MIN and MAX in a query
- P1 a3 canteen group byShort answer●●●●●
Explain what a transaction is and why some operations must succeed or fail as a unit
- P1 a3 wallet transactionShort answer●●●●●
Compare relational and non-relational approaches on schema flexibility, scaling and consistency
- P1 a3 fitness document dbShort answer●●●●●
Explain what machine learning is and how it differs from a conventionally programmed solution
- P1 a4 ml or rulesShort answer●●●●●
Distinguish supervised, unsupervised and reinforcement learning
- P1 a4 learning typesShort answer●●●●●
Distinguish classification from regression as supervised tasks
- P1 a4 weather predictShort answer●●●●●
- P1 case demand modelShort answer●●●●●
Compare running a model on an edge device with running it in a data centre or cloud platform
- P1 a4 camera edgeShort answer●●●●●
Recommend a hardware deployment for a described machine learning scenario and justify it
- P1 case five minute updatesShort answer●●●●●
Explain why raw data must be cleaned before training and what happens if it is not
- P1 case trip cleaningShort answer●●●●●
Identify data quality problems such as missing values, duplicates, outliers and inconsistent formats
- P1 a4 clean readingsShort answer●●●●●
Explain what feature selection is and why fewer, better features can improve a model
- P1 a4 feature choiceShort answer●●●●●
Interpret a fitted regression line and use it to make a prediction
- P1 a4 regression lineShort answer●●●●●
Evaluate a classifier using accuracy and the counts of correct and incorrect predictions per class
- P1 a4 phishing accuracyShort answer●●●●●
Explain what a hyperparameter is and how it differs from a learned parameter
- P1 a4 tree depthShort answer●●●●●
Explain why a model must be evaluated on data it was not trained on
- P1 case test splitShort answer●●●●●
Explain how bias enters a machine learning system through data, labels or design choices
- P1 a4 support biasShort answer●●●●●
- P1 case outer fairnessShort answer●●●●●
Apply decomposition to break a problem into sub-problems
- P2 b134 cinema decomposeShort answer●●●●●
Design an algorithm as an ordered sequence of unambiguous steps
- Seats togetherCoding exercise●●●●●
Read a flowchart and state what the algorithm it describes does
Read first →- Flowchart power of twoShort answer●●●●●
Trace a flowchart with given inputs and produce the correct output, using a trace table
- Flowchart oddsShort answer●●●●●
Declare and assign variables of the common primitive types
Read first →- Repeat lineCoding exercise●●●●●
- Trace: replace valueTrace table, Python only●●●●●
- Trace: two variablesTrace table, Python only●●●●●
- Type lineCoding exercise●●●●●
Choose an appropriate data type for a given value and explain why
- Data typesShort answer●●●●●
Distinguish local from global scope and predict which value a name refers to
Read first →- Trace: local scopeTrace table, Python only●●●●●
- Trace: local scope (Java)Trace table, Java only●●●●●
- Trace: param scopeTrace table, Python only●●●●●
- Trace: param scope (Java)Trace table, Java only●●●●●
- Scope shadowShort answer●●●●●
Trace a program by hand and record variable values at each step in a trace table
- Trace: p2 b2 weather traceTrace table, Python only●●●●●
Apply arithmetic, comparison and logical operators correctly, including operator precedence
Read first →- Fizz checkCoding exercise●●●●●
- Minutes to hoursCoding exercise●●●●●
- Ticket costCoding exercise●●●●●
- Trace: div modTrace table, Python only●●●●●
- Trace: precedenceTrace table, Python only●●●●●
- Coin changeCoding exercise●●●●●
- Leap year checkCoding exercise●●●●●
- RectangleCoding exercise●●●●●
Convert between data types explicitly and explain when conversion loses information
Read first →- Add agesCoding exercise●●●●●
- Double itCoding exercise●●●●●
- Data lossShort answer●●●●●
- Split billCoding exercise●●●●●
- Total priceCoding exercise●●●●●
Extract a substring from a string by position
Read first →- First characterCoding exercise●●●●●
- First N charactersCoding exercise●●●●●
- Characters at even indexesCoding exercise●●●●●
- Last characterCoding exercise●●●●●
- Remove first and lastCoding exercise●●●●●
- Swap halvesCoding exercise●●●●●
- Trace: char atTrace table, Python only●●●●●
- Trace: char at (Java)Trace table, Java only●●●●●
- Trace: count in a wordTrace table, Python only●●●●●
- Trace: count in a word (Java)Trace table, Java only●●●●●
Manipulate strings by concatenating, searching, replacing and changing case
Read first →- Closed signCoding exercise●●●●●
- Name tagCoding exercise●●●●●
- Same wordCoding exercise●●●●●
- Count a letterCoding exercise●●●●●
- Tidy a product codeCoding exercise●●●●●
- Before the @Coding exercise●●●●●
- Trace: case and replaceTrace table, Python only●●●●●
- Trace: case and replace (Java)Trace table, Java only●●●●●
- Trace: Java reverseTrace table, Java only●●●●●
Split a string on a delimiter and rejoin parts
Read first →- The longest wordCoding exercise●●●●●
- Reverse the wordsCoding exercise●●●●●
- Scores on one lineCoding exercise●●●●●
- Sports day reportCoding exercise●●●●●
Explain what an exception is and when a program should handle one
Read first →- Exception ageShort answer●●●●●
Write code that catches an exception and recovers, rather than crashing
Read first →- Snack orderCoding exercise●●●●●
- Ask until it is a numberCoding exercise●●●●●
Validate input so that bad data is rejected before it causes an error
Read first →- Check a nicknameCoding exercise●●●●●
- Mark checkerCoding exercise●●●●●
- Copies leftCoding exercise●●●●●
- Is it an hour?Coding exercise●●●●●
- Validate percentageShort answer●●●●●
Distinguish syntax, runtime and logic errors and identify which one a described failure is
Read first →- Which kind of errorShort answer●●●●●
- Bill share errorsShort answer●●●●●
Debug a program using tracing, test output and breakpoints, and explain the fix
Read first →- Fix the dry spell counterCoding exercise●●●●●
- Trace: find skipped valueTrace table, Python only●●●●●
- Trace: find skipped value (Java)Trace table, Java only●●●●●
Design test cases including normal, boundary and invalid inputs
Read first →- Bike hire test dataShort answer●●●●●
- Booking boundary bugShort answer●●●●●
Distinguish static from dynamic data structures
Read first →- Full array of timesShort answer●●●●●
Compare static and dynamic structures on memory use, flexibility and access speed
- Seats or waiting listShort answer●●●●●
Create, index, update and iterate over a one-dimensional array or list
Read first →- Last valueCoding exercise●●●●●
- Trace: list indexTrace table, Python only●●●●●
- Trace: list index (Java)Trace table, Java only●●●●●
- Count up in a listCoding exercise●●●●●
- Double every valueCoding exercise●●●●●
- Middle valueCoding exercise●●●●●
- Move the first to the endCoding exercise●●●●●
- Swap the endsCoding exercise●●●●●
- Is it an index?Coding exercise●●●●●
- Trace: double loopTrace table, Python only●●●●●
- Trace: double loop (Java)Trace table, Java only●●●●●
- Trace: list changesTrace table, Python only●●●●●
- Trace: list changes (Java)Trace table, Java only●●●●●
- Where it appearsCoding exercise●●●●●
Write code that searches or accumulates over a list
Read first →- Count above a limitCoding exercise●●●●●
- The averageCoding exercise●●●●●
- First repeat in a rowCoding exercise●●●●●
- Position of the largestCoding exercise●●●●●
- Largest minus smallestCoding exercise●●●●●
- Trace: running totalTrace table, Python only●●●●●
- Trace: running total (Java)Trace table, Java only●●●●●
- Biggest riseCoding exercise●●●●●
Create and traverse a two-dimensional array or list, including by row and by column
Read first →- Down the diagonalCoding exercise●●●●●
- Questions everyone got rightCoding exercise●●●●●
- Trace: column totalsTrace table, Python only●●●●●
- Trace: column totals (Java)Trace table, Java only●●●●●
- Warmest dayCoding exercise●●●●●
Trace code that manipulates an array or list and state the final contents
Read first →- Trace: carry largerTrace table, Python only●●●●●
- Trace: carry larger (Java)Trace table, Java only●●●●●
- Trace: swap passTrace table, Python only●●●●●
Explain the last in, first out behaviour of a stack and name its operations
Read first →- Stack in wordsShort answer●●●●●
Trace a sequence of push and pop operations and state the stack contents at the end
- What is left on the stackCoding exercise●●●●●
- Trace: stack movesTrace table, Python only●●●●●
- Trace: stack moves (Java)Trace table, Java only●●●●●
- The top of a small stackCoding exercise●●●●●
- Trace: p2 b134 stack traceTrace table, Python only●●●●●
Identify a problem that a stack solves naturally and explain why
Read first →- Tasks on holdShort answer●●●●●
- Do the brackets match?Coding exercise●●●●●
- Balanced bracketsCoding exercise●●●●●
Explain the first in, first out behaviour of a queue and name its operations
Read first →- Queue in wordsShort answer●●●●●
Trace a sequence of enqueue and dequeue operations and state the queue contents at the end
- Trace: queue movesTrace table, Python only●●●●●
- Trace: queue moves (Java)Trace table, Java only●●●●●
Identify a problem that a queue solves naturally and explain why
Read first →- Messages sent offlineShort answer●●●●●
- Take turns on the consoleCoding exercise●●●●●
Write a program whose statements run in the correct order to meet a stated objective
Read first →- Cafe menuCoding exercise●●●●●
- Door messagesCoding exercise●●●●●
- First lineCoding exercise●●●●●
- Floor signCoding exercise●●●●●
- ID cardCoding exercise●●●●●
- Message boardCoding exercise●●●●●
- Star bannerCoding exercise●●●●●
- Swap linesCoding exercise●●●●●
- Pay slipCoding exercise●●●●●
Write conditional statements using if, else if and else
Read first →- Even or oddCoding exercise●●●●●
- Old enoughCoding exercise●●●●●
- Password checkCoding exercise●●●●●
- Trace: if ageTrace table, Python only●●●●●
- Trace: if elseTrace table, Python only●●●●●
- Check temperatureCoding exercise●●●●●
- Command checkCoding exercise●●●●●
- Grade letterCoding exercise●●●●●
- Pass markCoding exercise●●●●●
- Range checkCoding exercise●●●●●
- Sign checkCoding exercise●●●●●
- Ticket priceCoding exercise●●●●●
- Trace: elifTrace table, Python only●●●●●
Write nested and compound conditions correctly
Read first →- Range with andCoding exercise●●●●●
- Login checkCoding exercise●●●●●
- Weekend checkCoding exercise●●●●●
- Trace: and orTrace table, Python only●●●●●
- Grade reportCoding exercise●●●●●
Trace a program with branching and state which branch runs for given inputs
Read first →- Trace: elif updateTrace table, Python only●●●●●
- Trace: gradesTrace table, Python only●●●●●
- Trace: two ifsTrace table, Python only●●●●●
Write a count-controlled loop
Read first →- Print starsCoding exercise●●●●●
- Repeat messageCoding exercise●●●●●
- For vs whileShort answer●●●●●
- Sum a rangeCoding exercise●●●●●
- Times table rowCoding exercise●●●●●
Write a condition-controlled loop and avoid an infinite loop
Read first →- Count until stopCoding exercise●●●●●
- Loop update ruleShort answer●●●●●
- Average scoreCoding exercise●●●●●
- Count the digitsCoding exercise●●●●●
- Halving stepsCoding exercise●●●●●
- Lift distanceCoding exercise●●●●●
- Sum until zeroCoding exercise●●●●●
- Trace: sum loopTrace table, Python only●●●●●
- Trace: while countdownTrace table, Python only●●●●●
- Find infinite loopShort answer●●●●●
- Stream statisticsCoding exercise●●●●●
Write nested loops, for example to process a two-dimensional structure
Read first →- Grid coordinatesCoding exercise●●●●●
- Star rectangleCoding exercise●●●●●
- Trace: nested gridTrace table, Python only●●●●●
Trace a loop and state the number of iterations and the final values
Read first →- Trace: digit sumTrace table, Python only●●●●●
- Trace: step loopTrace table, Java only●●●●●
- Trace: p2 b134 cinema free seatsTrace table, Java only●●●●●
- Trace: nested countTrace table, Python only●●●●●
Define a function with parameters and a return value, and call it
Read first →- Double a numberCoding exercise●●●●●
- Greeting with a borderCoding exercise●●●●●
- Is evenCoding exercise●●●●●
- Repeat a characterCoding exercise●●●●●
- Show N timesCoding exercise●●●●●
- Function purposeShort answer●●●●●
- Absolute valueCoding exercise●●●●●
- Custom borderCoding exercise●●●●●
- Integer powerCoding exercise●●●●●
Explain the difference between a parameter and an argument, and between returning and printing
Read first →- Param vs argShort answer●●●●●
- Clamp a valueCoding exercise●●●●●
- Trace: return valueTrace table, Python only●●●●●
- Trace: return value (Java)Trace table, Java only●●●●●
Decompose a long program into functions and explain the benefit of modularisation
Read first →- Largest of threeCoding exercise●●●●●
- Sum of digitsCoding exercise●●●●●
- Why decomposeShort answer●●●●●
- Score reportCoding exercise●●●●●
Explain what algorithmic efficiency means and why it is measured against input size rather than clock time
Read first →- Timing on two computersShort answer●●●●●
- Count the comparisonsShort answer●●●●●
State the meaning of the common complexity classes including constant, linear, logarithmic and quadratic time
Read first →- Name the growthShort answer●●●●●
- Word finder growthShort answer●●●●●
Determine the Big O complexity of a short piece of code from its loop structure
Read first →- Handshake countShort answer●●●●●
- Loops in a rowShort answer●●●●●
- Tournament roundsShort answer●●●●●
Write a binary search and explain why it requires sorted data
- Find a bookCoding exercise●●●●●
- P2 b2 library search compareShort answer●●●●●
Trace a binary search on a given sorted list and count the comparisons
- Trace: p2 b2 library traceTrace table, Python only●●●●●
Write a selection sort and state its complexity
- Rank the scoresCoding exercise●●●●●
Compare a recursive and an iterative solution to the same problem on clarity and cost
- P2 b2 leaderboard compareShort answer●●●●●
Write a recursive algorithm for a standard problem such as factorial or Fibonacci
- Best score, recursivelyCoding exercise●●●●●
Trace a recursive call stack and state the return value
- P2 b2 leaderboard recursion readShort answer●●●●●
Trace a program that creates several objects and state the state of each
- P2 b134 library static countShort answer●●●●●
Explain encapsulation and information hiding and why internal state is protected
- P2 b134 library encapsulationShort answer●●●●●
Explain inheritance and the relationship between a superclass and a subclass
- P2 b134 library reference bookShort answer●●●●●
Explain why separating interface from implementation lets the implementation change safely
- P2 b134 stack linked listShort answer●●●●●
Choose an appropriate ADT for a described problem and justify it
- P2 b134 stack or queueShort answer●●●●●