passdrill

Coding & Computers

10 cards · School · answer each one, then read the explanation. Your score tallies below.

0 / 10 answered · 0 correct

School · Coding & Computers · Card 001/010 easy

Computers represent everything - text, photos, music - using just two digits, 0 and 1 (binary), instead of the ten digits people use every day. What is the main reason computer hardware is built this way?

  1. Because early programmers found binary easier to type than decimal numbers
  2. Because binary numbers take up less digital storage space than decimal numbers for representing the same value
  3. Because the tiny electronic switches inside a computer chip are far more reliable when built to represent just two clear states, like off and on, than when built to reliably tell apart ten finely graded voltage levels
  4. Because human eyes cannot easily distinguish between ten different symbols on a screen
School · Coding & Computers · Card 002/010 easy

In computer logic, an AND gate takes two inputs and produces one output. Under what condition does an AND gate output a 1 (true)?

  1. Only when both of its inputs are 1
  2. When at least one of its two inputs is 1
  3. When exactly one of its two inputs is 1, but not both
  4. Whenever either input changes value, regardless of what it changes to
School · Coding & Computers · Card 003/010 easy

If you turn a computer completely off and then back on, any unsaved work in a running program disappears - but photos already saved to the hard drive or SSD are still there. What key difference between RAM and long-term storage explains this?

  1. RAM is physically located inside the CPU chip, while storage devices are always external plug-in accessories
  2. RAM can only hold text data, while storage devices are needed for anything else, like photos or video
  3. RAM works only when connected to the internet, while storage devices work fully offline
  4. RAM is volatile memory that needs a constant electrical charge to hold data, so it clears when power is lost, while storage devices like hard drives and SSDs retain data without power
School · Coding & Computers · Card 004/010 easy

A programmer wants to write a recipe app. Instead of writing the whole thing as one giant tangle of code, they break the problem into smaller separate parts, like 'search recipes', 'display a recipe', and 'save a favourite'. What is this problem-solving technique called in computer science?

  1. Encryption
  2. Decomposition
  3. Compilation
  4. Debugging
School · Coding & Computers · Card 005/010 medium

You're looking for a name in a printed phone book with 1,000 sorted pages. Which strategy finds it in far fewer steps: checking every page one by one from the start, or repeatedly opening to the middle of the remaining pages and deciding which half to search next?

  1. Opening the middle page each time and eliminating half the remaining pages at every step, because the pages are already sorted alphabetically, quickly narrows down where the name must be
  2. Checking every page one by one, because binary search only saves time when you already know exactly which page the name is on
  3. Opening the middle page each time, because splitting a list in half always cuts the work equally, whether or not the pages are sorted
  4. Checking every page one by one, because with only 1,000 pages, one-by-one checking and middle-splitting take roughly the same number of steps overall
School · Coding & Computers · Card 006/010 easy

In 1947, engineers working on the Harvard Mark II computer found an actual moth trapped in one of its electromechanical relays, causing a fault, and taped it into their logbook. What computing term is this famous incident credited with popularising?

  1. Byte
  2. Glitch
  3. Bug
  4. Crash
School · Coding & Computers · Card 007/010 medium

Deep inside a computer, the letter 'A' you type isn't stored as a letter at all - it's stored as a number. In the widely used ASCII text-encoding standard, what number represents the uppercase letter 'A'?

  1. 97
  2. 48
  3. 13
  4. 65
School · Coding & Computers · Card 008/010 medium

A programmer writes 'score = 0' at the start of a game's code, then later writes 'score = score + 10' every time points are earned. What does this show about what a 'variable' is in programming?

  1. A variable is a fixed value that, once set in the code, can never be changed while the program runs
  2. A variable is a named container that stores a value which can be read and changed while the program runs, letting 'score' hold different numbers at different points in the game
  3. A variable is a comment left in the code to explain what a line does, which the computer ignores when running the program
  4. A variable is a fixed instruction telling the computer to display a value on the screen
School · Coding & Computers · Card 009/010 hard

Bubble sort repeatedly steps through a list, and on each pass compares each pair of neighbouring elements. What does it do when it finds a pair that is in the wrong order?

  1. It removes one of the two elements from the list entirely
  2. It moves the smaller element all the way to the very front of the whole list immediately
  3. It swaps the two neighbouring elements, then continues comparing the next pair further along the list
  4. It stops the entire sorting process and restarts from the very beginning of the list
School · Coding & Computers · Card 010/010 hard

In 1843, Ada Lovelace published notes on Charles Babbage's proposed Analytical Engine, a mechanical general-purpose computer that was never actually built in her lifetime. What is she most credited with, based on those notes?

  1. Writing what is widely considered the first published algorithm intended to be carried out by a machine, for computing a sequence of Bernoulli numbers
  2. Physically building the first working general-purpose computer using gears and steam power
  3. Inventing the modern binary number system that all computers now use internally
  4. Coining the term 'computer' to describe a machine rather than a human calculator