Embercode
✕
How Computers WorkQuick quiz

Units, compression and boot

10 questions. Covers Boot: from power button to login.

Questions 1 to 5 of 10

  1. 1. A file is 2 GB in decimal units. The link runs at 80 Mbps. About how many seconds does the download take, ignoring overheads?
  2. 2. What does this code print? ``python size = 3_000_000 print(f"{size / 1024:,.1f} KiB") ``
  3. 3. Binary prefixes such as KiB and MiB step up from one unit to the next by what factor? Write the number.

    Type your answer.

  4. 4. True or false: a link rated at 100 Mbps delivers 100 MB of data every second.
  5. 5. This code reads the words of a sentence and builds codes the way a dictionary-style compressor does. What does it print? ``python text = "a b a b a b c" table = {} codes = [] for w in text.split(): if w not in table: table[w] = len(table) codes.append(table[w]) print(codes) ``

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.