Term pack
Year 9 Computing
Name: ________________________
Skills in this pack
- Hexadecimal numbers
- Text as numbers
- The boxes that make a network work
- The shapes a network is built in
- Addresses and names on a network
- Spreadsheet functions
- Copying formulas, and references that stay put
- Charts from a spreadsheet
- Loops that count
- Blocks and indentation
- Loops inside loops
- Procedures, and calling them
- Procedures that take values and give one back
Free at www.arenapublications.com/learn — no account, no ads, ever.
Year 9 Computing · 1 of 13
Hexadecimal numbers
Read a hexadecimal number, turn it into decimal or into binary, and say why programmers write bits this way.
1.Which point on the line is the hexadecimal number 3A written in decimal?
Mark the line with an X.
2.Only one of these four is not a hexadecimal number at all. Which one?
- a) 3G4
- b) A0C
- c) 9FB
- d) 72E
3.Two hexadecimal digits are written side by side. What is the largest decimal number the pair of them can hold between them?
- a) 256
- b) 128
- c) 99
- d) 255
4.Hexadecimal needs sixteen digits, so after 9 the letters carry the count on. What is the digit C worth in decimal?
5.Match each hexadecimal digit to the four bits it stands for.
- 4
- 7
- 9
- D
- E
- 0100
- 1110
- 0111
- 1101
- 1001
6.Write the decimal number 200 in hexadecimal. Use two hexadecimal digits.
7.Write the decimal number 45 in hexadecimal. Use two hexadecimal digits.
8.A byte is eight bits long. How many hexadecimal digits does it take to write one whole byte?
Hexadecimal numbers · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 2 of 13
Text as numbers
Work out the code number a character is stored as, and how many bytes a piece of text needs.
1.Capitals are stored from 65 and small letters from 97. A computer puts a list of words in order by the code number of the first character. Which of these words does it put first?
- a) cherry
- b) banana
- c) apple
- d) Zebra
2.Digit characters run in order from 48, capitals from 65 and small letters from 97. Put these characters in order of the code number stored for each, smallest first.
- capital B
- small z
- capital M
- the digit character 7
- small d
3.Each message is stored one character per byte, gaps included. Match each message to the number of bytes it needs.
- YES
- HELLO
- OK NOW
- GOODBYE
- I AM HERE
- 5
- 9
- 3
- 6
- 7
4.Capital A is stored as 65 and small a is stored as 97. How much bigger is the code for a small letter than the code for the capital of the very same letter?
5.The capital letters run in order from 65 and the small letters run in order from 97, twenty-six of each. Sort each code number by which kind of letter it stands for.
Groups: A capital letter · A small letter
- 88
- 115
- 78
- 70
- 99
- 104
6.Capital A is stored as 65 and the capital letters carry straight on from there. Which capital letter is stored as 72?
7.A code with one byte per character can tell apart 256 different characters. Why is one byte per character not enough for the writing used around the world?
- a) Every character needs a whole byte of its own even when it is only a letter
- b) Punctuation marks and gaps are not characters and have to be stored some other way
- c) Every language would need a computer built specially for it
- d) The writing systems of the world need far more than 256 different characters between them
8.In a computer's character code, capital A is stored as 65 and the capital letters that follow carry straight on. What number is stored for capital D?
Text as numbers · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 3 of 13
The boxes that make a network work
Work out what a hub, a switch, a router, a modem and an access point each do, and choose the one a job needs.
1.A lab with twenty machines has its hub taken out and a switch put in its place, and everything suddenly runs faster. What is the reason?
- a) A switch keeps a copy of every message so nothing ever needs sending twice
- b) A switch is built with thicker cables than a hub is
- c) Far fewer copies of each message are being put on the cables, so there is less traffic to get through
- d) A switch sits closer to the machines than a hub does
2.Two computers stand in the same room and are plugged into the same switch. One sends the other a file. Does the file pass through the router at the edge of the building?
- a) Yes, because the router holds the list of which machine is which
- b) No — a message between two computers uses no device at all
- c) No — both machines are on the same network, so the switch can deliver it by itself
- d) Yes — every message a computer sends passes through the router
3.A home has one box that joins its computers to each other, hands messages on to the outside world, and plugs into the line coming into the house. Someone says the home therefore has no modem. What is wrong with that?
- a) A box that joins computers to each other can never plug into a line
- b) A home has no need for a modem at all
- c) A modem and a router are two names for exactly the same job
- d) One box can do several jobs at once, and the part talking to the line is doing a modem's job
4.A hub copies every message out to every other machine plugged into it. Four computers are on one hub, and each of the four sends one message. How many copies arrive at machines altogether?
5.A message is sent from a computer in a lab to a machine on a network far away. Put these in the order the message reaches them.
- The computer that sends the message
- The router at the edge of the building
- A network outside the building
- The switch that computer is plugged into
6.A lab already has a switch with every computer cabled to it. An access point is added. What can the lab do now that it could not do before?
- a) Push messages along the existing cables faster than before
- b) Stop a copy of every message going to every machine
- c) Let a device with no cable of its own join the network
- d) Reach a second network on the other side of the school
7.A switch sends a message out to the one machine it is addressed to and to nobody else. Eight computers are plugged into a switch, and one sends a message meant for a second. How many computers receive a copy of it?
8.Match each device to the job it does.
- A hub
- A switch
- A router
- A modem
- An access point
- Delivers a message to the one machine it is addressed to
- Turns signals into a form that can travel down the line to the outside world
- Repeats everything it hears out to everything plugged into it
- Hands messages on between two different networks
- Lets a device with no cable of its own join the network
The boxes that make a network work · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 4 of 13
The shapes a network is built in
Work out how much cable a bus, star, ring or mesh needs, and what a single break costs each of them.
1.A bus network joins nine computers along one long cable. The cable is cut, leaving four computers on one side of the break. How many pairs of computers, one taken from each side, have lost contact with each other?
2.Six computers are joined in a star. Each one has a single cable running to the switch in the middle, and no other cables at all. How many cables does the network use?
3.Five computers are joined in a mesh, so every computer has its own cable to every other computer. How many cables is that altogether?
4.A full mesh is almost never used for a large office. What is the reason?
- a) A mesh stops working the moment a single cable is cut
- b) A mesh can only carry a message in one direction round the office
- c) The number of cables climbs far faster than the number of computers does
- d) No more than four computers can ever be joined in a mesh
5.In a mesh every computer has a cable to every other one. Match each mesh to the number of cables it needs.
- 3 computers
- 8 computers
- 9 computers
- 10 computers
- 12 computers
- 36
- 3
- 66
- 28
- 45
6.In a mesh, every computer has a cable to every other one. How many cables run from one single computer in a mesh of seven?
7.A star has eight computers around one switch. The switch itself stops working. How many of the eight can still reach another computer?
8.In a star network each computer has one cable of its own to the switch in the middle. One of those outer cables is cut. What happens?
- a) Nothing changes at all, because messages take a different route
- b) Every computer on the network is cut off from every other one
- c) The switch is cut off but the computers can still reach each other
- d) The computer on the far end of that cable is cut off, and the rest carry on as before
The shapes a network is built in · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 5 of 13
Addresses and names on a network
Read a machine's address, work out which machines share a network, and say what turns a name into an address.
1.Which of these is a name service's job rather than a router's?
- a) Joining two different networks together
- b) Saying which number belongs to a given name
- c) Carrying a message out of the building
- d) Choosing which network to hand a message on to next
2.Machines share a network when the first three of their four numbers match. One machine is at 172.20.1.5 and another is at 172.20.9.5. What has to happen for a message to get from one to the other?
- a) It has to be handed to a router, because the two are not on the same network
- b) One of them has to change its address so that all four numbers match
- c) Nothing out of the ordinary — they are already on the same network
- d) The two machines have to swap names with each other first
3.Two machines share a network when the first three of their four numbers are the same. Each of these machines is sending to the machine at 192.168.4.9. Sort each sender by whether its message stays on one network.
Groups: Stays on one network · Crosses to another network
- 10.0.4.9
- 192.168.4.1
- 192.168.4.40
- 172.16.4.9
- 192.168.7.40
- 192.168.4.200
4.Every address on one network begins 10.4.2, and the last number may be anything from 20 to 90. How many machines can that network hold?
5.Two different machines on one network are given the same address by mistake. What goes wrong?
- a) The network runs more slowly, but everything still arrives where it should
- b) Nothing goes wrong, because an address is allowed to be shared
- c) Both machines stop working altogether until one is unplugged
- d) Messages meant for one of them can arrive at the other, because the address no longer says which machine is which
6.Machines share a network when the first three of their four numbers match. Match each machine to the network it is on.
- 192.168.1.7
- 192.168.2.7
- 10.1.1.7
- 172.16.5.7
- 10.1.2.7
- 192.168.2
- 192.168.1
- 10.1.2
- 10.1.1
- 172.16.5
7.Each of the four numbers in an address is held in one byte, so it runs from 0 up to the largest value one byte can hold. Which point on the line is that largest value?
Mark the line with an X.
8.A website is moved onto a different machine with a different address, and keeps the name it always had. What has to be changed so that people can still reach it?
- a) Every browser in the world, one at a time
- b) What the name service answers when it is asked about that name
- c) The address of the computer belonging to each person visiting
- d) The name itself, so that it matches the new machine
Addresses and names on a network · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 6 of 13
Spreadsheet functions
Work out what SUM, AVERAGE, MAX, MIN, COUNT and IF show for a sheet you are given.
1.A sheet holds G1 = 72. This formula is typed into G2. What does G2 show?
=IF(G1 > 50, "Pass", "Try again")
2.A sheet holds M1 = 9, M2 = 4, M3 = 15 and M4 = 4. Sort each formula by whether it shows 15.
Groups: Shows 15 · Shows something else
- =MAX(M1:M4)
- =MIN(M1:M4)
- =SUM(M2:M4)
- =SUM(M1:M2)+2
- =COUNT(M1:M4)
- =M3
3.A sheet holds Q1 = 3, Q2 = 12, Q3 = 6 and Q4 = 9. Put these formulas in order of the number each one shows, smallest first.
- =SUM(Q1:Q4)
- =MIN(Q1:Q4)
- =AVERAGE(Q1:Q4)
- =COUNT(Q1:Q4)
- =MAX(Q1:Q4)
4.A sheet holds D1 = 12, D2 = 45, D3 = 7 and D4 = 31. What number does this formula show?
=MIN(D1:D4)
5.A sheet holds V1 = 10, V2 = 4, V3 = 16 and V4 = 6. What number does this formula show?
=MAX(V1:V4) - MIN(V1:V4)
6.A column of twelve cells holds nine numbers and three pieces of writing. What does a COUNT over the whole column show?
- a) 9
- b) 0
- c) 12
- d) 3
7.A sheet holds S1 = 30. This formula is typed into S2. What does S2 show?
=IF(S1 > 30, "Over", "Not over")
8.A sheet holds E1 = 5, E3 = 9 and E4 = 2, and E2 has been left empty. COUNT looks at a range and counts only the cells holding a number. What number does this formula show?
=COUNT(E1:E4)
Spreadsheet functions · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 7 of 13
Copying formulas, and references that stay put
Work out what a formula points at once it has been copied, and use a dollar sign to stop a reference moving.
1.Each of these formulas sits in C2 and is copied down into C3. Sort each one by whether the copy reads any differently from the original.
Groups: The copy reads differently · The copy reads exactly the same
- =A2*3
- =$A$1*3
- =A$2+B$2
- =A2+B2
- =$A$2+$B$2
- =$A2+$B2
2.Cell A1 holds =B1+C1. The formula is copied down into A2. In the copy, which cell takes the place of B1?
3.Every one of these formulas sits in row 2 and is copied down into row 3. Match each formula to what the copy reads.
- =A2
- =$A2
- =A2+B2
- =A2*5
- =SUM(A1:A2)
- =A3+B3
- =SUM(A2:A3)
- =$A3
- =A3
- =A3*5
4.Cell A2 holds =A1+B1. The formula is copied into C5, so it has moved both across and down. In the copy, which cell takes the place of A1?
5.A times-table grid is being built. Column A holds the numbers going down and row 1 holds the numbers going across. One formula is written in B2 and then copied both across and down to fill the whole grid. Which formula belongs in B2?
- a) =A$2*$B1
- b) =A2*B1
- c) =$A2*B$1
- d) =$A$2*$B$1
6.Cell E2 holds =E1+5. The formula is copied across into F2. Which cell does the copy add 5 to?
7.Column B holds a price on every row. One single rate sits in F1. A formula is to be written in C2 and then copied all the way down the column, multiplying each price by that rate. Which formula belongs in C2?
- a) =B2*$F$1
- b) =B2*F1
- c) =$B$2*$F$1
- d) =$B$2*F1
8.Cell N3 holds =SUM(N1:N2). The formula is copied down into N5. In the copy, which cell is the last one in the range being added up?
Copying formulas, and references that stay put · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 8 of 13
Charts from a spreadsheet
Choose the kind of chart a set of numbers needs, and read amounts and shares off the chart that results.
1.A chart is drawn from a range of cells, one bar for each cell. Match each range to the number of bars the chart would have.
- B2:B5
- C1:C9
- D3:D8
- A2:A12
- E4:E10
- 11
- 7
- 6
- 9
- 4
2.A sheet records how many of the 200 pupils in a year group joined each of four clubs, and every pupil joined exactly one. The chart is to show what share of the year group each club took. Which kind of chart is that?
- a) A pie chart
- b) A chart with a single bar for the whole year group
- c) A chart with one point for each of the 200 pupils
- d) A line chart
3.A sheet holds a shop's takings on each of thirty days running. The chart is to show whether they are climbing or falling as the days go by. Which kind of chart is that?
- a) A chart with one slice for each of the thirty days
- b) A line chart
- c) A chart with a single bar for the thirty days together
- d) A pie chart
4.A bar chart's upright scale begins at 90 rather than at nothing. Two of its bars stand for 95 and for 100. What does the chart do to the difference between the two?
- a) Shows it exactly as it is
- b) Hides it, so that the two bars look identical
- c) Makes it look far smaller than it is
- d) Makes it look far bigger than it is
5.Someone draws a pie chart from the temperature at noon on each of four days. Why is a pie chart the wrong choice here?
- a) A pie chart cannot show a number larger than a hundred
- b) A pie chart can only ever show three things at a time
- c) A slice shows a share of one whole, and four temperatures added together make no whole of anything
- d) The four days would have to be put in order of temperature first
6.A bar chart is drawn from the range D2:D13, one bar for each cell. Two of those cells have been left empty and no bar is drawn for them. How many bars does the chart have?
7.A pie chart is drawn for 24 people, one of whom is you. How many degrees of the circle does a single person take?
8.A pie chart is drawn for four clubs that 200 pupils divided themselves between, and 50 of them joined one particular club. How many degrees of the circle does that club's slice take?
Charts from a spreadsheet · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 9 of 13
Loops that count
Work out what values a counting loop's variable takes, and how many times its body runs.
1.Follow this code by hand. How many numbers does it print altogether?
for n in range(2, 7): print(n) print(n * 10)2.This loop takes away rather than adds. What is total at the end?
total = 100 for n in range(1, 4): total = total - n3.Follow this code by hand. How many numbers does it print?
for n in range(3, 9): print(n)4.Look hard at the two numbers in the range. How many times does the indented line run?
for step in range(5, 5): print(step)- a) 0
- b) 10
- c) 5
- d) 1
5.The counter starts a long way above zero here. How many times does the indented line run?
for n in range(10, 20): print(n * 2)6.Each of these loops prints its counter every time round. Match each range to the last number the loop prints.
- range(1, 6)
- range(4, 9)
- range(0, 3)
- range(7, 11)
- range(2, 15)
- 5
- 10
- 2
- 8
- 14
7.Follow this code by hand. What is the last number it prints?
for n in range(1, 5): print(n)8.Follow this code by hand. What is the largest number it prints?
for n in range(6, 11): print(n * 3)
Loops that count · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 10 of 13
Blocks and indentation
Read a program's indentation to say which lines belong to which block, and how often each line runs.
1.Follow this code by hand. How many times does the most deeply indented line run?
for n in range(1, 5): print(n) if n > 100: print(n * 2)2.The last line has been brought back out to the left. What is total at the end?
total = 0 for n in range(1, 4): total = total + 10 total = total + 13.This program prints four numbers. Put them in the order they appear on the screen.
total = 0 for n in range(1, 4): total = total + 5 print(total) print(total - 12)- 15
- 5
- 10
- 3
4.Sort each line of this program by how many times it runs.
total = 0 for n in range(1, 4): total = total + n print(n) print(total) print(total * 2)Groups: Runs once · Runs three times
- total = total + n
- print(total)
- total = 0
- print(n)
- print(total * 2)
5.A test sits inside the loop here. What is total at the end?
total = 0 for n in range(1, 6): if n > 3: total = total + n6.Both of the printing lines are indented here. How many numbers does it print?
for n in range(1, 4): print(n) print(99)7.Follow this code by hand. What is count at the end?
count = 0 for n in range(1, 7): if n > 2: count = count + 1 count = count + 108.One line is indented here and one is not. How many numbers does it print?
for n in range(1, 4): print(n) print(99)
Blocks and indentation · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 11 of 13
Loops inside loops
Work out how many times the body of a loop inside another loop runs, and in what order the two counters change.
1.Follow this code by hand. How many times does the most deeply indented line run?
for a in range(1, 4): for b in range(1, 5): print(a * b)2.Follow this code by hand. What is count at the end?
count = 0 for a in range(1, 5): for b in range(1, 6): count = count + 13.Follow this code by hand. How many numbers does it print?
for a in range(1, 3): for b in range(1, 3): print(b)4.In this program, which line runs the greatest number of times?
for a in range(1, 6): print(a) for b in range(1, 4): print(b) print(0)- a) The line printing 0
- b) The line printing a
- c) The line printing b
- d) The heading of the inner loop
5.Follow this code by hand. What is total at the end?
total = 0 for a in range(1, 4): for b in range(1, 4): total = total + a * b6.Follow this code by hand. How many numbers does it print altogether?
for a in range(1, 4): print(a) for b in range(1, 3): print(b)7.A loop sits inside another loop. The inner range is made one longer while the outer range is left exactly as it was. What happens to the number of times the deepest line runs?
- a) It goes up by the number of trips the outer loop makes
- b) It goes up by one
- c) It stays exactly the same
- d) It doubles
8.In each of these, one loop sits inside another with a single line at the deepest level. Match each pair of ranges to how many times that line runs.
- range(1, 3) outside, range(1, 6) inside
- range(1, 4) outside, range(1, 8) inside
- range(1, 5) outside, range(1, 3) inside
- range(2, 5) outside, range(1, 5) inside
- range(1, 10) outside, range(1, 3) inside
- 18
- 12
- 10
- 21
- 8
Loops inside loops · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 12 of 13
Procedures, and calling them
Read a program that gives a block of lines a name, and say what runs, when, and how many times.
1.One of these four lines never runs at all. Which one?
def alpha(): print(1) def beta(): print(2) alpha() print(3)- a) The line printing 2
- b) The line printing 3
- c) The line printing 1
- d) The line calling alpha
2.A procedure whose body is a single printing line is used in five different programs. Match each way of using it to how many times its body runs.
- Defined but never called
- Called once at the end of the program
- Called inside a loop over range(1, 6)
- Called twice, and again inside a loop over range(1, 5)
- Called inside a loop over range(1, 3) that itself sits inside a loop over range(1, 5)
- 1
- 8
- 6
- 5
- 0
3.A loop does the calling here. How many numbers does it print?
def pair(): print(1) print(2) for n in range(1, 4): pair()4.Follow this code by hand. How many times does the line printing 3 run?
def step(): print(3) for n in range(1, 5): step()5.Follow this code by hand. What is the first number it prints?
def mark(): print(10) def note(): print(20) note() mark()6.The named block has a loop inside it. How many numbers does it print?
def show(): for n in range(1, 4): print(n) show() show()7.Read this program from the top down. How many numbers does it print?
def show(): print(5)- a) 0
- b) It cannot be run at all
- c) 1
- d) 5
8.A loop calls a block that calls another block. How many numbers does it print?
def inner(): print(1) def outer(): inner() inner() for n in range(1, 5): outer()
Procedures, and calling them · Year 9 Computing · www.arenapublications.com/learn
Year 9 Computing · 13 of 13
Procedures that take values and give one back
Read a procedure that is handed values to work on, and work out what a call to it gives.
1.A procedure named grow takes a number and gives back that number plus a tenth of it. Which of these calls gives 55?
- a) grow(60)
- b) grow(50)
- c) grow(55)
- d) grow(45)
2.One call sits inside another here. What number does it print?
def double(x): return x * 2 print(double(double(3)))3.This procedure doubles whatever it is handed. What number does it print?
def double(x): return x * 2 print(double(7))4.Two calls happen one after the other here. What number does it print?
def treble(x): return x * 3 a = treble(3) b = treble(a) print(b)5.A procedure named gap takes two numbers and gives back the first one take away the second. Exactly one of these calls gives 6. Which?
- a) gap(10, 4)
- b) gap(4, 6)
- c) gap(6, 6)
- d) gap(4, 10)
6.A procedure named step takes a number and gives back 100 take away that number multiplied by itself. Put these calls in order of the value each one gives, smallest first.
- step(7)
- step(2)
- step(3)
- step(5)
7.A procedure named area takes a length and a width and gives back one multiplied by the other. Match each call to the value it gives.
- area(3, 4)
- area(5, 5)
- area(2, 9)
- area(6, 7)
- area(1, 8)
- 8
- 12
- 18
- 42
- 25
8.This procedure has a loop inside it. What number does it print?
def upto(n): total = 0 for k in range(1, n + 1): total = total + k return total print(upto(5))
Procedures that take values and give one back · Year 9 Computing · www.arenapublications.com/learn
Answer keys — Year 9 Computing
In the same order as the worksheets.
Hexadecimal numbers
- 1. 58
- 2. a) 3G4
- 3. d) 255
- 4. 12
- 5. 4 → 0100; 7 → 0111; 9 → 1001; D → 1101; E → 1110
- 6. C8
- 7. 2D
- 8. 2
Text as numbers
- 1. d) Zebra
- 2. 1. the digit character 7 2. capital B 3. capital M 4. small d 5. small z
- 3. YES → 3; HELLO → 5; OK NOW → 6; GOODBYE → 7; I AM HERE → 9
- 4. 32
- 5. 70 → A capital letter; 99 → A small letter; 88 → A capital letter; 104 → A small letter; 78 → A capital letter; 115 → A small letter
- 6. H
- 7. d) The writing systems of the world need far more than 256 different characters between them
- 8. 68
The boxes that make a network work
- 1. c) Far fewer copies of each message are being put on the cables, so there is less traffic to get through
- 2. c) No — both machines are on the same network, so the switch can deliver it by itself
- 3. d) One box can do several jobs at once, and the part talking to the line is doing a modem's job
- 4. 12
- 5. 1. The computer that sends the message 2. The switch that computer is plugged into 3. The router at the edge of the building 4. A network outside the building
- 6. c) Let a device with no cable of its own join the network
- 7. 1
- 8. A hub → Repeats everything it hears out to everything plugged into it; A switch → Delivers a message to the one machine it is addressed to; A router → Hands messages on between two different networks; A modem → Turns signals into a form that can travel down the line to the outside world; An access point → Lets a device with no cable of its own join the network
The shapes a network is built in
- 1. 20
- 2. 6
- 3. 10
- 4. c) The number of cables climbs far faster than the number of computers does
- 5. 3 computers → 3; 8 computers → 28; 9 computers → 36; 10 computers → 45; 12 computers → 66
- 6. 6
- 7.
- 0
- none
- 8. d) The computer on the far end of that cable is cut off, and the rest carry on as before
Addresses and names on a network
- 1. b) Saying which number belongs to a given name
- 2. a) It has to be handed to a router, because the two are not on the same network
- 3. 192.168.4.40 → Stays on one network; 192.168.7.40 → Crosses to another network; 192.168.4.200 → Stays on one network; 10.0.4.9 → Crosses to another network; 192.168.4.1 → Stays on one network; 172.16.4.9 → Crosses to another network
- 4. 71
- 5. d) Messages meant for one of them can arrive at the other, because the address no longer says which machine is which
- 6. 192.168.1.7 → 192.168.1; 192.168.2.7 → 192.168.2; 10.1.1.7 → 10.1.1; 172.16.5.7 → 172.16.5; 10.1.2.7 → 10.1.2
- 7. 255
- 8. b) What the name service answers when it is asked about that name
Spreadsheet functions
- 1. Pass
- 2. =MAX(M1:M4) → Shows 15; =SUM(M2:M4) → Shows something else; =MIN(M1:M4) → Shows something else; =M3 → Shows 15; =SUM(M1:M2)+2 → Shows 15; =COUNT(M1:M4) → Shows something else
- 3. 1. =MIN(Q1:Q4) 2. =COUNT(Q1:Q4) 3. =AVERAGE(Q1:Q4) 4. =MAX(Q1:Q4) 5. =SUM(Q1:Q4)
- 4. 7
- 5. 12
- 6. a) 9
- 7. Not over
- 8. 3
Copying formulas, and references that stay put
- 1. =A2+B2 → The copy reads differently; =$A$2+$B$2 → The copy reads exactly the same; =A$2+B$2 → The copy reads exactly the same; =$A2+$B2 → The copy reads differently; =A2*3 → The copy reads differently; =$A$1*3 → The copy reads exactly the same
- 2. B2
- 3. =A2 → =A3; =$A2 → =$A3; =A2+B2 → =A3+B3; =A2*5 → =A3*5; =SUM(A1:A2) → =SUM(A2:A3)
- 4. C4
- 5. c) =$A2*B$1
- 6. F1
- 7. a) =B2*$F$1
- 8. N4
Charts from a spreadsheet
- 1. B2:B5 → 4; C1:C9 → 9; D3:D8 → 6; A2:A12 → 11; E4:E10 → 7
- 2. a) A pie chart
- 3. b) A line chart
- 4. d) Makes it look far bigger than it is
- 5. c) A slice shows a share of one whole, and four temperatures added together make no whole of anything
- 6. 10
- 7. 15
- 8. 90
Loops that count
- 1. 10
- 2. 94
- 3. 6
- 4. a) 0
- 5. 10
- 6. range(1, 6) → 5; range(4, 9) → 8; range(0, 3) → 2; range(7, 11) → 10; range(2, 15) → 14
- 7. 4
- 8. 30
Blocks and indentation
- 1.
- 0
- none
- 2. 31
- 3. 1. 5 2. 10 3. 15 4. 3
- 4. total = 0 → Runs once; total = total + n → Runs three times; print(n) → Runs three times; print(total) → Runs once; print(total * 2) → Runs once
- 5. 9
- 6. 6
- 7. 64
- 8. 4
Loops inside loops
- 1. 12
- 2. 20
- 3. 4
- 4. c) The line printing b
- 5. 36
- 6. 9
- 7. a) It goes up by the number of trips the outer loop makes
- 8. range(1, 3) outside, range(1, 6) inside → 10; range(1, 4) outside, range(1, 8) inside → 21; range(1, 5) outside, range(1, 3) inside → 8; range(2, 5) outside, range(1, 5) inside → 12; range(1, 10) outside, range(1, 3) inside → 18
Procedures, and calling them
- 1. a) The line printing 2
- 2. Defined but never called → 0; Called once at the end of the program → 1; Called inside a loop over range(1, 6) → 5; Called twice, and again inside a loop over range(1, 5) → 6; Called inside a loop over range(1, 3) that itself sits inside a loop over range(1, 5) → 8
- 3. 6
- 4. 4
- 5. 20
- 6. 6
- 7. a) 0
- 8. 8
Procedures that take values and give one back
- 1. b) grow(50)
- 2. 12
- 3. 14
- 4. 27
- 5. a) gap(10, 4)
- 6. 1. step(7) 2. step(5) 3. step(3) 4. step(2)
- 7. area(3, 4) → 12; area(5, 5) → 25; area(2, 9) → 18; area(6, 7) → 42; area(1, 8) → 8
- 8. 15
Year 9 Computing · www.arenapublications.com/learn