IB Computer Science HL study materials
IB Computer Science HL study resources

IB Computer Science HL practice questions

One question at a time. Build your IB Computer Science HL understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1System fundamentals

In the context of system fundamentals, which term describes the physical components of a computer system, such as the CPU, RAM, and storage devices?

  1. Software
  2. Peripheral
  3. Firmware
  4. Hardware Correct answer.

Explanation

Hardware refers to the tangible, physical parts of a computer system, including the processor, memory modules, and drives. Software consists of the programs and instructions, while firmware is a specific class of software embedded in hardware.

Question 2System fundamentals

A school replaces ten standalone desktop computers with thin clients connected to a single central server that runs all applications. Which change best describes the effect on system management?

  1. Software updates and backups are applied centrally on the server rather than on each client Correct answer.
  2. Data storage is distributed across all clients, removing the need for a server backup
  3. Each thin client must be individually patched with its own operating system
  4. Processing power on each client increases because applications run locally

Explanation

In a thin-client model, applications and data are managed on the central server, so administrators install updates and perform backups in one place. This reduces the administrative effort compared with maintaining each standalone machine separately.

Question 3System fundamentals

Which statement best describes the role of an operating system in managing system resources?

  1. It compiles source code into executable machine instructions
  2. It encrypts all network traffic leaving the computer
  3. It allocates memory and processor time among running processes Correct answer.
  4. It converts high-level database queries into physical disk addresses

Explanation

A core function of the operating system is resource management: it schedules CPU time, allocates memory, and coordinates access to devices for running processes. Compilation and query translation are handled by other software layers.

Question 4System fundamentals

A hospital stores patient records and needs to guarantee that all staff always see the most current version of a record. Which data management approach best satisfies this requirement?

  1. Printed copies distributed to each department daily
  2. A centralised database on a server accessed by all staff Correct answer.
  3. Individual spreadsheets saved on each staff member's laptop
  4. A shared folder of exported files with no version control

Explanation

A centralised database ensures a single authoritative copy of each record, so every user reads the same current data. Distributed local copies and printed versions risk inconsistency and delay.

Question 5System fundamentals

Which of the following is the main purpose of a backup strategy in system fundamentals?

  1. To restore data and system state after loss or corruption Correct answer.
  2. To compress files so they occupy less disk space
  3. To prevent unauthorised users from logging in
  4. To increase the processing speed of the CPU

Explanation

A backup creates copies of data so that the system can be restored if data is lost, corrupted, or destroyed. Speed, access control, and compression are separate concerns handled by other mechanisms.

Question 6System fundamentals

A company wants to reduce the risk that a single hard disk failure destroys its database. Which solution addresses this specific risk?

  1. Install a faster network switch for the server
  2. Increase the amount of RAM installed in the server
  3. Use a RAID configuration that mirrors data across multiple disks Correct answer.
  4. Upgrade the server's operating system to the latest version

Explanation

RAID mirroring stores identical data on more than one disk, so if one disk fails the data remains available on another. RAM, networking, and OS upgrades do not provide redundancy against disk failure.

Question 7System fundamentals

Which statement correctly distinguishes a local area network (LAN) from a wide area network (WAN)?

  1. A LAN always uses wireless links, while a WAN always uses wired links
  2. A LAN covers a small geographic area such as one building, while a WAN spans larger distances Correct answer.
  3. A LAN has no server, while a WAN always contains at least one server
  4. A LAN requires public internet access, while a WAN operates without it

Explanation

The defining distinction is geographic scope: a LAN connects devices within a limited area such as a school or office, while a WAN connects networks across cities or countries. The other options describe implementation details that are not definitional.

Question 8System fundamentals

A user reports that a workstation cannot reach any website, but other computers on the same network work normally. Which first diagnostic step is most appropriate?

  1. Check the workstation's network settings and cable or wireless connection Correct answer.
  2. Contact the internet service provider to report an outage
  3. Reinstall the operating system on the affected workstation
  4. Replace the network switch that serves the whole building

Explanation

Since other machines work, the fault is likely local to the affected workstation, so checking its connection and configuration is the logical first step. Replacing shared equipment or reinstalling the OS is disproportionate before basic checks.

Question 9System fundamentals

Which of the following best describes the purpose of a user interface in a computer system?

  1. To allow a human user to interact with and control the system Correct answer.
  2. To manage the allocation of physical memory pages
  3. To route data packets between separate networks
  4. To translate program source code into machine code

Explanation

The user interface provides the means by which people interact with the system, whether through a graphical or command-line interface. Compilation, memory management, and packet routing are functions of other components.

Question 10System fundamentals

A software team must choose between developing a system in-house and buying a ready-made package. Which factor most strongly favours buying the package?

  1. The organisation has a large in-house development team with spare capacity
  2. The organisation wants complete control over the source code for future changes
  3. The organisation needs highly specialised functionality not offered by any vendor
  4. The organisation's requirements are common and closely match the package's features Correct answer.

Explanation

When requirements are standard and match an existing product, buying a package is usually faster and cheaper than building from scratch. Highly specialised needs or a desire for source-code control tend to favour in-house development.

Question 11System fundamentals

Which statement best explains why data validation is applied at the point of data entry in an information system?

  1. It sorts the data into the correct order automatically
  2. It guarantees that all stored data is free of any errors
  3. It encrypts the data so that it cannot be intercepted
  4. It reduces the chance that incorrect data is stored and later processed Correct answer.

Explanation

Validation checks input against defined rules, such as range or format, to catch obvious errors before they enter the system. It reduces but cannot eliminate errors, and it is distinct from encryption or sorting.

Question 12System fundamentals

A company allows employees to use personal laptops on the corporate network. Which control most directly reduces the risk of malware spreading from these devices?

  1. Storing all corporate files on each employee's local disk
  2. Requiring up-to-date antivirus and enforced security checks before network access is granted Correct answer.
  3. Increasing the bandwidth of the corporate network connection
  4. Allowing employees to choose their own operating system version

Explanation

Enforcing endpoint security checks before granting network access ensures that personal devices meet a baseline of protection, reducing the chance of malware entering the network. Bandwidth and local storage choices do not address malware risk.

Question 13System fundamentals

An organisation adopts a policy of regular, tested restoration from backups. Which benefit does the testing step specifically provide?

  1. It removes the need to store backups off-site
  2. It eliminates the need for any future backups
  3. It confirms that backups can actually be restored within an acceptable time Correct answer.
  4. It increases the storage capacity of the backup media

Explanation

A backup is only useful if it can be restored successfully, so testing verifies both the integrity of the backup and the time required for recovery. Testing does not remove the need for off-site copies or for ongoing backups.

Question 14System fundamentals

Which of the following best explains the concept of a virtual machine in system fundamentals?

  1. A database that stores records in multiple tables
  2. A network device that forwards packets between subnets
  3. Software that emulates a complete computer system, allowing multiple operating systems to run on one physical host Correct answer.
  4. A physical server dedicated to running exactly one application

Explanation

A virtual machine is a software-defined emulation of a computer that runs its own operating system on shared physical hardware. This allows several isolated systems to coexist on a single host, improving hardware utilisation.

Question 15System fundamentals

A web application experiences a sudden surge in traffic, and response times increase sharply. Which analysis best explains the bottleneck?

  1. The database schema has too many tables for the application to read
  2. The client browsers are all running the same version
  3. The application's source code contains comments that slow execution
  4. Demand for server processing and memory exceeds available capacity, so requests queue Correct answer.

Explanation

A sharp rise in concurrent requests can exhaust server CPU and memory, causing requests to wait in queues and increasing response time. Schema size, browser uniformity, and source comments do not explain a sudden load-related slowdown.

Question 16System fundamentals

Two systems handle the same transaction: one processes it on a single server, the other distributes it across several servers. Which statement best evaluates the distributed approach?

  1. It always guarantees lower latency because more servers are involved
  2. It eliminates the possibility of network failures affecting the system
  3. It can improve throughput and fault tolerance, but introduces complexity in coordination and consistency Correct answer.
  4. It removes the need for any backup or recovery strategy

Explanation

Distributing work across servers can increase throughput and let the system tolerate individual server failures, but it adds coordination overhead and makes keeping data consistent harder. It does not guarantee lower latency or remove the need for backups.

Question 17Computer organization

In the stored-program concept, what is held in main memory during execution?

  1. Only the data, because instructions are held in the control unit
  2. The compiler's source listing and its symbol table
  3. Only the program instructions, because data lives on the disk
  4. Both the program instructions and the data being processed Correct answer.

Explanation

The stored-program concept, attributed to von Neumann, keeps instructions and data together in the same addressable main memory. The CPU fetches instructions from that memory and reads or writes data at other addresses, so no separate instruction store is required.

Question 18Computer organization

A CPU has a 2.5 GHz clock. What is the duration of one clock cycle?

  1. 2.5 ns
  2. 0.4 ns Correct answer.
  3. 0.25 ns
  4. 4.0 ns

Explanation

Cycle time is the reciprocal of clock frequency, so T = 1 / (2.5 × 10^9 Hz) = 4 × 10^-10 s = 0.4 ns. The frequency in GHz gives nanoseconds directly as 1/2.5.

Question 19Computer organization

Which statement describes the role of the address bus during a memory read?

  1. It carries the address of the location the CPU wants to access, in one direction only Correct answer.
  2. It carries the data value between the CPU and memory in both directions
  3. It carries control signals such as read/write and clock synchronisation
  4. It carries the address in both directions so memory can reply with its own address

Explanation

The address bus is unidirectional: the CPU (or another bus master) places the target address on it, and memory or I/O decodes that address. Data travels on the separate bidirectional data bus, while control lines carry read/write and timing signals.

Question 20Computer organization

A machine has 24 address lines and is byte-addressable. What is its maximum directly addressable main memory size?

  1. 24 MiB
  2. 16 MB
  3. 16 MiB Correct answer.
  4. 24 MB

Explanation

With n address lines and byte addressing, the address space is 2^n bytes. Here 2^24 bytes = 16,777,216 bytes = 16 MiB, since 2^20 bytes make one mebibyte.

Question 21Computer organization

Why does a CPU cache improve average memory access time?

  1. It stores only instructions, so data accesses bypass the slower main memory
  2. Frequently used blocks are copied close to the CPU, exploiting locality of reference Correct answer.
  3. It increases the clock frequency of the processor during memory operations
  4. It permanently replaces main memory for all running programs

Explanation

Cache holds recently or frequently accessed blocks so that many requests are satisfied without going to slower main memory. This works because programs exhibit temporal and spatial locality, giving a high hit rate and reducing average access time.

Question 22Computer organization

An instruction is 16 bits wide and the opcode occupies the most significant 5 bits. How many distinct opcodes are available, and how many bits remain for operands?

  1. 32 opcodes, 5 operand bits
  2. 16 opcodes, 11 operand bits
  3. 5 opcodes, 16 operand bits
  4. 32 opcodes, 11 operand bits Correct answer.

Explanation

A 5-bit opcode field gives 2^5 = 32 distinct opcode patterns. The remaining width is 16 − 5 = 11 bits, which can be split into register numbers, addressing modes or an immediate value.

Question 23Computer organization

Which pair correctly matches a register with its function in the fetch–execute cycle?

  1. Memory address register holds the decoded opcode; memory data register holds the program counter value
  2. Program counter holds the address of the next instruction; instruction register holds the instruction currently being decoded Correct answer.
  3. Program counter holds the current instruction; instruction register holds the address of the next instruction
  4. Accumulator holds the address of the next instruction; program counter holds the arithmetic result

Explanation

The program counter stores the address of the next instruction to be fetched, and it is incremented as part of the fetch stage. The fetched instruction is placed in the instruction register, where it is decoded before execution.

Question 24Computer organization

A program spends 40% of its execution time on floating-point operations. Adding a co-processor makes those operations 8 times faster while all other times stay the same. What is the overall speedup?

  1. About 3.20
  2. About 1.54 Correct answer.
  3. About 2.00
  4. About 8.00

Explanation

Using Amdahl's law with fraction f = 0.4 and speedup s = 8: new time = 0.6 + 0.4/8 = 0.65 of the original. Overall speedup = 1/0.65 ≈ 1.54, limited by the unaffected 60%.

Question 25Computer organization

Which statement best distinguishes RISC from CISC instruction sets?

  1. RISC favours a small set of simple fixed-length instructions, while CISC favours many complex variable-length instructions Correct answer.
  2. RISC allows operands to come from memory in arithmetic instructions, while CISC restricts operands to registers
  3. RISC instructions are always microcoded in ROM, while CISC instructions execute directly in hardware
  4. RISC uses a stack-based model, while CISC uses only immediate addressing

Explanation

RISC designs emphasise a compact set of simple, usually fixed-length instructions that pipeline well, with arithmetic typically register-to-register. CISC designs offer a larger, richer set of variable-length instructions that may combine several operations and access memory directly.

Question 26Computer organization

What is the main purpose of the pipeline in a processor?

  1. To reduce the latency of every individual instruction to one cycle
  2. To overlap the stages of different instructions so throughput increases Correct answer.
  3. To store the results of completed instructions for later reuse
  4. To convert high-level source code into machine instructions

Explanation

Pipelining lets several instructions be in different stages at the same time, so a new instruction can finish on most cycles. This raises throughput even though the latency of a single instruction is not reduced and may even rise slightly.

Question 27Computer organization

A pipeline has 5 stages and each stage takes 2 ns. How long does it take to complete 100 instructions in steady state, ignoring hazards and fill time?

  1. About 10 ns
  2. About 1000 ns
  3. About 208 ns Correct answer.
  4. About 200 ns

Explanation

The first instruction takes 5 × 2 = 10 ns to fill the pipeline, and each of the remaining 99 instructions completes one per cycle of 2 ns. Total = 10 + 99 × 2 = 208 ns.

Question 28Computer organization

What is the difference between a control bus signal and an interrupt?

  1. A control signal only comes from memory, while an interrupt only comes from the clock
  2. A control signal is asynchronous, while an interrupt is always sent on the data bus
  3. A control signal coordinates a normal bus operation, while an interrupt requests the CPU's attention asynchronously Correct answer.
  4. A control signal and an interrupt are the same mechanism with different names

Explanation

Control signals such as read, write and clock coordinate the timing of ordinary transfers on the bus. An interrupt is a separate request, raised by a device or software, that makes the CPU suspend its current sequence and service an interrupt handler.

Question 29Computer organization

Which statement about the von Neumann bottleneck is correct?

  1. The bottleneck is removed entirely by increasing the clock frequency
  2. Instruction and data fetches share one memory path, so the CPU may wait for memory Correct answer.
  3. The bottleneck is caused by having too many general-purpose registers
  4. The CPU can fetch instructions and data simultaneously because they use separate buses

Explanation

In a classic von Neumann machine, instructions and data share the same memory and transfer path, so only one can be fetched at a time. The processor can therefore stall waiting for memory, and this limit is what caches and the Harvard-style split caches attempt to mitigate.

Question 30Computer organization

Which sequence correctly orders the stages of the fetch–decode–execute cycle?

  1. Fetch operands, execute, fetch instruction, decode instruction, store result
  2. Fetch instruction, decode instruction, fetch operands, execute, store result Correct answer.
  3. Fetch instruction, execute, decode instruction, fetch operands, store result
  4. Decode instruction, fetch instruction, execute, fetch operands, store result

Explanation

The CPU first fetches the instruction from the address in the program counter, then decodes it to determine the operation and operands. Operands are then obtained, the operation is executed by the ALU, and any result is written back.

Question 31Computer organization

A cache has an access time of 2 ns and main memory 60 ns. With a hit rate of 95%, what is the average access time assuming a miss costs the main memory access in addition to the cache lookup?

  1. 57.0 ns
  2. 4.9 ns Correct answer.
  3. 5.0 ns
  4. 3.1 ns

Explanation

Average time = hit time + miss rate × miss penalty = 2 + 0.05 × 60 = 2 + 3 = 5 ns when the miss penalty is only the main memory time. Including the cache lookup on a miss adds 0.05 × 2 = 0.1 ns, giving 4.9 ns.

Question 32Computer organization

What is the function of the memory data register (MDR) during a memory write?

  1. It increments the program counter after the write
  2. It decodes the opcode of the store instruction
  3. It holds the address of the location to be written
  4. It holds the value that is to be written to the addressed memory location Correct answer.

Explanation

The MDR acts as the buffer between the CPU and memory for the value being transferred, so on a write it holds the data to be stored. The address travels on the address bus via the MAR, and decoding and PC updating are separate functions.

Question 33Networks

In a TCP/IP network, which layer is responsible for logical addressing and routing of packets between networks?

  1. Internet layer Correct answer.
  2. Link layer
  3. Application layer
  4. Transport layer

Explanation

The Internet layer (often called the network layer in OSI) handles logical addressing (IP addresses) and routing, determining the path packets take across multiple networks. The transport layer provides end-to-end communication, the link layer handles physical transmission on a local segment, and the application layer supports user services.

Question 34Networks

A company assigns the IPv4 address 192.168.10.0/26 to a subnet. How many usable host addresses does this subnet provide?

  1. 64
  2. 62 Correct answer.
  3. 30
  4. 126

Explanation

A /26 prefix leaves 6 host bits (32 - 26 = 6), giving 2^6 = 64 total addresses. Subtracting the network address and the broadcast address leaves 62 usable host addresses.

Question 35Networks

Which statement best describes the role of the Domain Name System (DNS) in network communication?

  1. It dynamically assigns IP addresses to devices when they join a network.
  2. It routes packets between autonomous systems on the Internet.
  3. It translates human-readable domain names into IP addresses. Correct answer.
  4. It encrypts data transmitted between web browsers and servers.

Explanation

DNS is a hierarchical naming system that resolves domain names (such as www.example.com) into IP addresses so that clients can reach servers. It does not assign addresses, encrypt traffic, or perform routing.

Question 36Networks

Which protocol operates at the transport layer and provides reliable, connection-oriented delivery of a byte stream?

  1. HTTP
  2. UDP
  3. TCP Correct answer.
  4. IP

Explanation

TCP is a connection-oriented transport protocol that establishes a session, uses acknowledgements and retransmissions, and delivers an ordered byte stream. UDP is connectionless and unreliable; IP and HTTP operate at different layers.

Question 37Networks

Which device primarily forwards frames based on MAC addresses within a single local area network?

  1. Firewall
  2. Router
  3. Switch Correct answer.
  4. Gateway

Explanation

A switch operates at the data link layer and uses a MAC address table to forward Ethernet frames only to the port where the destination device is connected. Routers forward packets between networks using IP addresses; gateways translate between dissimilar protocols; firewalls filter traffic based on security rules.

Question 38Networks

A network administrator needs to connect two office buildings 2 km apart with a dedicated, high-bandwidth link that is immune to electromagnetic interference. Which transmission medium is most appropriate?

  1. Fiber-optic cable Correct answer.
  2. Unshielded twisted pair (UTP) cable
  3. Infrared wireless
  4. Coaxial cable

Explanation

Fiber-optic cable uses light signals through glass or plastic strands, providing high bandwidth over long distances and immunity to electromagnetic interference. UTP and coaxial cable suffer signal attenuation and EMI over such distances, and infrared requires line of sight and short range.

Question 39Networks

Which address range is reserved for private IPv4 networks and is defined in RFC 1918?

  1. 11.0.0.0 to 11.255.255.255
  2. 224.0.0.0 to 239.255.255.255
  3. 10.0.0.0 to 10.255.255.255 Correct answer.
  4. 192.0.2.0 to 192.0.2.255

Explanation

RFC 1918 defines three private IPv4 address blocks: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. The 10.0.0.0/8 range is the largest of these and is not routable on the public Internet.

Question 40Networks

A user reports that a workstation can access local resources but cannot reach any external websites by domain name, although pinging 8.8.8.8 succeeds. Which is the most likely cause?

  1. The network cable is faulty.
  2. The subnet mask is set to 255.255.255.0.
  3. The default gateway is misconfigured.
  4. The DNS server address is incorrect. Correct answer.

Explanation

Successful pinging of an external IP address (8.8.8.8) shows that routing and connectivity to the Internet are working. The failure to reach websites by name points to a name-resolution problem, typically an incorrect DNS server setting.

Question 41Networks

Which statement accurately describes the difference between IPv4 and IPv6 addressing?

  1. IPv4 supports subnetting, while IPv6 does not.
  2. IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses. Correct answer.
  3. IPv4 includes a checksum in the header, while IPv6 does not include any header fields.
  4. IPv4 uses decimal notation, while IPv6 uses only binary notation.

Explanation

IPv4 addresses are 32 bits long, allowing about 4.3 billion unique addresses, whereas IPv6 addresses are 128 bits long, providing a vastly larger address space. IPv6 is typically written in hexadecimal notation and supports subnetting; it also has a simplified header without a checksum.

Question 42Networks

A network uses a star topology with a central switch. Which is a key advantage of this topology compared with a bus topology?

  1. It is immune to collisions by design.
  2. A failure of one cable affects only the device connected to that cable. Correct answer.
  3. It operates without any central device.
  4. It requires less cabling than a bus topology.

Explanation

In a star topology, each device has a dedicated link to the central switch, so a break in one cable affects only that device. A bus topology shares a single backbone, so a break can disrupt the entire network. Star topologies require more cabling and still rely on a central device.

Question 43Networks

Which protocol is used by a client to securely retrieve email while keeping messages on the server, and uses TCP port 993 by default?

  1. SMTP
  2. POP3
  3. SNMP
  4. IMAP Correct answer.

Explanation

IMAP (Internet Message Access Protocol) allows a client to access and manage mail stored on a server, and IMAPS uses TCP port 993 for secure communication. SMTP is for sending mail, POP3 downloads and often deletes messages from the server, and SNMP is for network management.

Question 44Networks

A packet with source IP 192.168.1.10 and destination IP 192.168.1.20 is sent on a LAN. What does the sending host use to determine the destination MAC address?

  1. ICMP echo request
  2. ARP request Correct answer.
  3. DNS query
  4. DHCP discover

Explanation

Because the destination IP is on the same subnet, the host needs the MAC address of the destination. It broadcasts an ARP request asking which device has IP 192.168.1.20, and the owner replies with its MAC address.

Question 45Networks

Which statement best explains why a switch reduces collisions compared with a hub?

  1. A switch creates a separate collision domain on each port. Correct answer.
  2. A switch uses CSMA/CA instead of CSMA/CD.
  3. A switch forwards all frames to every port.
  4. A switch increases the size of the broadcast domain.

Explanation

A switch learns MAC addresses and forwards frames only to the port where the destination is located, so each port forms its own collision domain. A hub repeats signals to all ports, creating a single shared collision domain.

Question 46Networks

A company uses NAT on its border router. Which problem does NAT primarily solve?

  1. It guarantees quality of service for real-time applications.
  2. It allows multiple devices with private IPv4 addresses to share a single public IPv4 address. Correct answer.
  3. It encrypts traffic between the private network and the Internet.
  4. It prevents all malware from entering the private network.

Explanation

NAT translates private IPv4 addresses to a public address (or addresses) at the network boundary, conserving the limited IPv4 address space. It does not provide encryption, QoS, or security against malware.

Question 47Networks

An organization is allocated the IPv4 network 172.16.0.0/22. It needs to divide this network into four equal-sized subnets. What prefix length should each subnet use?

  1. /25
  2. /23
  3. /26
  4. /24 Correct answer.

Explanation

A /22 network has 10 host bits. To create four equal subnets, two additional bits are needed (2^2 = 4), so the new prefix length is 22 + 2 = 24. Each /24 subnet contains 256 addresses.

Question 48Networks

In a TCP three-way handshake, what is the correct sequence of flags exchanged to establish a connection?

  1. SYN, SYN-ACK, ACK Correct answer.
  2. SYN, ACK, SYN-ACK
  3. ACK, SYN, ACK
  4. SYN, FIN, ACK

Explanation

The client initiates with a SYN segment, the server responds with a SYN-ACK segment acknowledging the client's sequence number and sending its own, and the client completes the handshake with an ACK. This synchronizes sequence numbers and confirms both sides are ready.

Question 49Computational thinking, problem-solving and programming

A program stores student marks in an array and must find the highest mark. Which algorithmic construct is essential for examining every element of the array?

  1. A repetition (loop) structure that visits each index in turn Correct answer.
  2. A single conditional statement that tests only the first index
  3. A procedure call that returns the array's length
  4. A declaration that initialises the maximum to zero

Explanation

Finding a maximum requires comparing every stored value against a running maximum, so a loop must iterate across all valid indices of the array. A conditional alone tests one position, and neither a length lookup nor an initialisation performs any comparison.

Question 50Computational thinking, problem-solving and programming

In a flowchart, which symbol represents a decision that selects between two alternative paths?

  1. A rectangle
  2. A parallelogram
  3. A rounded rectangle
  4. A diamond Correct answer.

Explanation

Standard flowchart notation uses a diamond for a decision, with one outgoing flow for each possible outcome of the condition. Rectangles denote processes, parallelograms denote input or output, and rounded rectangles typically mark start or end terminals.