Term pack
Grade 7 Computer Science
Name: ________________________
Skills in this pack
- Bigger binary numbers
- Adding binary numbers
- Reading spreadsheet formulas
- The internet and the web
- HTML attributes and links
- HTML lists and tables
- Variables in a program
- Tracing a loop with a total
- Choosing between more than two things
- Combining conditions with and, or and not
Free at www.arenapublications.com/learn — no account, no ads, ever.
Grade 7 Computer Science · 1 of 10
Bigger binary numbers
Read and write binary numbers with several places, and work out how many different values a given number of bits can hold.
Before you start
Move along this line and think about which binary places you would need to reach each point.
The points that need only a single 1 — 1, 2, 4, 8, 16, 32 — are the place values themselves. Everything else is built by adding a few of them together.
1.What is the largest number that fits in 4 bits?
- a) 14
- b) 8
- c) 16
- d) 15
2.With 3 bits you can write 000, 001, 010 and so on. How many different values is that altogether?
- a) 9
- b) 6
- c) 8
- d) 3
3.What is the binary number "110110" worth as an ordinary number?
4.Put these binary numbers in order, smallest first.
- 1101
- 101
- 10001
- 1010
- 100100
5.A byte is eight bits. How many different values can one byte hold?
- a) 128
- b) 512
- c) 256
- d) 64
6.How many different values can be written with 5 bits?
7.The binary number "101100" sits at one of these points. Tap it.
Mark the line with an X.
8.Write the number 20 in binary.
Bigger binary numbers · Grade 7 Computer Science · www.arenapublications.com/learn
Grade 7 Computer Science · 2 of 10
Adding binary numbers
Add two binary numbers place by place, carrying into the next place whenever a column comes to more than one.
1.Add the binary numbers "1011" and "110". Write the answer in binary.
2.Put these binary additions in order of their answers, smallest first.
- 10 + 1
- 100 + 11
- 110 + 100
- 1000 + 101
- 11 + 10
3.Add the binary numbers "11" and "1". Write the answer in binary.
4.Sort each addition by whether its right-hand column produces a carry.
Groups: Produces a carry · No carry
- 101 + 11
- 1000 + 111
- 100 + 10
- 1001 + 1001
- 11 + 1
- 10 + 1
5.Match each binary addition to its answer.
- 1 + 10
- 11 + 11
- 100 + 100
- 101 + 10
- 1001 + 11
- 111
- 110
- 1100
- 11
- 1000
6.Add the binary numbers "10111" and "1001". Write the answer in binary.
7.Adding "111" and "1" gives an answer with how many binary places?
- a) 4
- b) 5
- c) 2
- d) 3
8.Add the binary numbers "1111" and "1". Write the answer in binary.
Adding binary numbers · Grade 7 Computer Science · www.arenapublications.com/learn
Grade 7 Computer Science · 3 of 10
Reading spreadsheet formulas
Read a spreadsheet formula, work out which cells it refers to, and say what number it will show.
1.The same sheet holds A1 = 4, A2 = 6 and A3 = 9. What number does the formula "=A3-A1" show?
2.A sheet holds A1 = 9 and A2 = 3, and a cell holding "=A1/A2" is showing 3. You then change A1 to 12. What does that cell show now?
- a) 3
- b) It keeps showing 3 until the formula is typed in again
- c) 4
- d) 12
3.A sheet holds A1 = 2, A2 = 5, A3 = 8 and A4 = 1. What number does the formula "=SUM(A1:A4)" show?
4.A sheet holds D1 = 12, D2 = 15 and D3 = 9. What number does the formula "=SUM(D1:D3)" show?
5.A sheet holds C1 = 20 and C2 = 4. What number does the formula "=C1/C2" show?
6.A sheet holds A1 = 10 and A2 = 4. Match each formula to the number it shows.
- =A1+A2
- =A1-A2
- =A1*A2
- =A1/A2
- =A2*A2
- 40
- 16
- 6
- 14
- 2.5
7.Sort each formula by whether it adds its cells together or multiplies them.
Groups: Adds · Multiplies
- =D1*D2
- =A1+A2
- =B2*B3
- =SUM(C1:C5)
- =E1*E2
- =A4+B4
8.A sheet holds B1 = 7 and B2 = 3. What number does the formula "=B1*B2" show?
Reading spreadsheet formulas · Grade 7 Computer Science · www.arenapublications.com/learn
Grade 7 Computer Science · 4 of 10
The internet and the web
Tell the internet apart from the web, and say what has to happen between two machines before a page appears on your screen.
1.Three friends each open the same page at the same time, and each of them receives their own copy of it. How many copies travel out?
2.Opening one page sends a request out and brings a copy of the page back. Counting the request going out and the page coming back, how many journeys across the network is that?
3.Someone unplugs the cable that joins a school to the company supplying its connection. Which of these still works?
- a) Joining a video call with another school
- b) Opening a file kept on the school's own lab network
- c) Opening a page from a site in another country
- d) Sending a message to a school in the next city
4.Which of these cannot be done at all by a device that is joined to nothing?
- a) Adding two numbers in a calculator app
- b) Opening a page it has never opened before
- c) Typing a letter and saving it
- d) Drawing a picture in a paint program
5.Messages were being carried between distant machines for years before the first web page was ever written. What does that tell you?
- a) The two are simply different names for the same thing
- b) The web is one of the things carried, and not the carrier itself
- c) Those early messages were a kind of web page
- d) The web came first and messaging copied it
6.Put these in the order they happen when someone opens a web page.
- The address is typed in and entered
- The machine holding the page finds the one that was asked for
- A copy of the page travels back
- The browser draws the page on the screen
- A request for that page travels out across the network
7.Sort each job by whether the browser on your own device does it, or the machine holding the page does it.
Groups: The browser · The machine holding the page
- Reads the address that was typed in
- Starts the request off
- Answers with a copy of the page
- Paints the words and pictures onto the screen
- Stores the page until somebody asks for it
- Picks out the right page from the ones it holds
8.Two thousand people open the same page one morning. How many of that page is the machine holding it likely to be storing?
- a) Two thousand, one for each visitor
- b) Two thousand and one
- c) One, and each visitor is sent a copy of it
- d) None — each browser makes the page up for itself
The internet and the web · Grade 7 Computer Science · www.arenapublications.com/learn
Grade 7 Computer Science · 5 of 10
HTML attributes and links
Read the attributes inside an opening tag, and work out where a link goes and which words a reader clicks to follow it.
1.A page holds “<a href="library.html">Books</a>”. Which piece is the link text and which is the destination?
- a) Both pieces are the destination
- b) Both pieces are the text
- c) Books is the text; library.html is the destination
- d) library.html is the text; Books is the destination
2.An attribute is a name, an equals sign and a value in quotes, written inside the opening tag. How many attributes does “<img src="cat.png" alt="A cat" width="200">” have?
3.In the picture tag “<img src="kite.png" alt="A paper kite">”, which file holds the picture?
4.Match each attribute name to what it says.
- href
- src
- alt
- width
- How wide to draw a picture
- Which page the link opens
- Which file a picture comes from
- Words to use in place of a picture
5.Which of these is written as an attribute usually is — a name, an equals sign, then a value inside quotes?
- a) "href"=home.html
- b) href="home.html"
- c) href home.html
- d) href-home.html
6.In the picture tag “<img src="kite.png" alt="A paper kite">”, what is the alt attribute for?
- a) The size the picture should be drawn at
- b) Words describing the picture, for a reader who cannot see it
- c) The page the picture links to
- d) The name the picture is saved under
7.A page holds “<a href="one.html">First</a> and <a href="two.html">Second</a> and <a href="three.html">Third</a> and <a href="four.html">Fourth</a>”. How many links is that?
8.Sort each opening tag by whether it carries an attribute.
Groups: Carries an attribute · Carries none
- <b>
- <img src="sun.png">
- <h1>
- <p>
- <a href="math.html">
- <a href="home.html">
HTML attributes and links · Grade 7 Computer Science · www.arenapublications.com/learn
Grade 7 Computer Science · 6 of 10
HTML lists and tables
Read an HTML list or table, count its items, rows and cells, and say which of its tags sits inside which.
Before you start
Every cell of this table has a name — find out what each one is called. Notice that the name says which row first, and only then how far along.
- 1. Row 1, cell 1
- 2. Row 1, cell 2
- 3. Row 1, cell 3
- 4. Row 2, cell 1
- 5. Row 2, cell 2
- 6. Row 2, cell 3
- 7. Row 3, cell 1
- 8. Row 3, cell 2
- 9. Row 3, cell 3
Every cell needs its own tag, and every row needs one as well — so a grid this size takes nine cell tags wrapped in three row tags, not nine tags on their own.
1.Match each tag to what one of it holds.
- <ul>
- <ol>
- <li>
- <tr>
- <td>
- A whole list with a bullet against each item
- One cell of a table
- A whole list with a number against each item
- One row of a table
- One item of a list
2.How many cells does that same table hold altogether: “<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr><tr><td>5</td><td>6</td></tr></table>”?
3.A table is built from 5 row tags, and each row holds 3 cell tags. How many cells is that altogether?
4.Which of these is nested correctly?
- a) <ul><li>Milk</ul></li>
- b) <ul><li>Milk</li></ul>
- c) <ul><li>Milk</li></ol>
- d) <li><ul>Milk</li></ul>
5.In “<ul><li>Red</li><li>Blue</li><li>Green</li><li>Black</li><li>White</li></ul>”, how many item tags are there altogether, counting the opening and closing tags separately?
6.This table has three rows and three cells in each row. Tap the cell in the second row, third along.
Write the number of the part.
7.Which tag closes “<li>”?
8.A recipe's steps have to be followed in a set order, and the reader needs to see which step is which. Which tag should wrap that list?
- a) <li>
- b) <td>
- c) <ul>
- d) <ol>
HTML lists and tables · Grade 7 Computer Science · www.arenapublications.com/learn
Grade 7 Computer Science · 7 of 10
Variables in a program
Follow what a named value holds as a program changes it line by line, and say what it holds at the end.
1.A program has set score to 6. Match each line that runs next to what score holds afterwards.
- add 4 to score
- take 4 away from score
- set score to 4
- set score to score times 4
- add score to score
- 2
- 24
- 12
- 10
- 4
2.A program says: set m to 9; set m to m plus m. What does m hold now?
- a) 0
- b) 9
- c) 81
- d) 18
3.A program says: set total to 4; set total to 7; print total. What appears on the screen?
- a) 4
- b) 11
- c) First 4 and then 7
- d) 7
4.A program says: set x to 3; set y to x; set x to 8. What does y hold now?
5.Sort each line by whether it changes what total holds.
Groups: Changes it · Leaves it as it was
- compare total with 10
- set total to 0
- take 2 away from total
- print total
- add 5 to total
- show total on the screen
6.A program says: set a to 6; set b to 4; set a to a plus b. What does a hold now?
7.A program says: set price to 20; set price to price times 2. What does price hold now?
- a) 2
- b) 20
- c) 22
- d) 40
8.A program says: set score to 5; add 3 to score. What does score hold now?
Variables in a program · Grade 7 Computer Science · www.arenapublications.com/learn
Grade 7 Computer Science · 8 of 10
Tracing a loop with a total
Trace a loop that keeps a running total, and say what the total holds once the loop has finished.
1.A program says: set total to 10; repeat 3 times: add 4 to total. What does total hold at the end?
2.A program says: set total to 1; repeat 4 times: double total. What does total hold at the end?
3.A program says: set total to 0; repeat 4 times: add 3 to total. Someone answers 3, because 3 was the last thing added. What is wrong with that?
- a) Nothing is wrong — 3 is right
- b) The total starts again from nothing each time round
- c) The loop only ever runs once
- d) The total keeps everything added before it, so it comes to 12
4.A program says: set total to 100; repeat 5 times: take 8 away from total. What does total hold at the end?
5.A program says: set total to 0; repeat 5 times: add 2 to total. After the loop has finished, it prints total once. How many numbers appear on the screen?
- a) None
- b) Ten
- c) One
- d) Five
6.A program says: set total to 0; repeat 4 times: add 6 to total. What does total hold at the end?
7.A program says: set total to 0; repeat 7 times: add 3 to total. What does total hold at the end?
8.Each of these programs starts with total holding 0. Sort each loop by whether it finishes with total above 30.
Groups: Above 30 · 30 or below
- repeat 3 times: add 5 to total
- repeat 5 times: add 4 to total
- repeat 4 times: add 9 to total
- repeat 8 times: add 5 to total
- repeat 7 times: add 6 to total
- repeat 2 times: add 8 to total
Tracing a loop with a total · Grade 7 Computer Science · www.arenapublications.com/learn
Grade 7 Computer Science · 9 of 10
Choosing between more than two things
Follow a chain of tests in which the first one that comes out true wins, and say which branch a program takes.
1.A program says: if the score is at least 90, print "Gold"; else if the score is at least 70, print "Silver"; else if the score is at least 50, print "Bronze"; otherwise print "Try again". The score is 89. What does it print?
2.Put these three lines into the order that makes the chain work as it is meant to: numbers above 100 should give Huge, and other numbers above 10 should give Big.
- test whether the number is more than 10, and print "Big" if it is
- test whether the number is more than 100, and print "Huge" if it is
- if neither test held, print "Small"
3.A program says: if the number is more than 10, print "Big"; else if the number is more than 100, print "Huge"; otherwise print "Small". The number is 500. What does it print?
- a) Big
- b) Both Big and Huge
- c) Small
- d) Huge
4.A program says: if the score is at least 90, print "Gold"; else if the score is at least 70, print "Silver"; else if the score is at least 50, print "Bronze"; otherwise print "Try again". The score is 95. What does it print?
5.A program says: if the score is at least 90, print "Gold"; else if the score is at least 70, print "Silver"; else if the score is at least 50, print "Bronze"; otherwise print "Try again". The score is 70. What does it print?
6.A program says: if the number is less than 0, print "Negative"; else if the number is 0, print "Zero"; otherwise print "Positive". The number is 7. What does it print?
7.A program says: if the score is at least 90, print "Gold"; else if the score is at least 70, print "Silver"; else if the score is at least 50, print "Bronze"; otherwise print "Try again". The score is 49. What does it print?
8.A program says: if the age is at least 18, print "Adult"; else if the age is at least 13, print "Teenager"; else if the age is at least 5, print "Child"; otherwise print "Toddler". Match each age to what the program prints.
- 20
- 13
- 9
- 3
- Child
- Teenager
- Toddler
- Adult
Choosing between more than two things · Grade 7 Computer Science · www.arenapublications.com/learn
Grade 7 Computer Science · 10 of 10
Combining conditions with and, or and not
Work out whether a condition joined by and, or or not comes out true, and which branch a program takes because of it.
1.A condition says: the number is more than 50 and the number is less than 10. Which numbers make it true?
- a) The numbers between 10 and 50
- b) No number at all
- c) Every number
- d) Only 10 and 50 themselves
2.Sort each statement by whether it is true or false.
Groups: True · False
- 4 is more than 5 and 4 is less than 9
- 8 is more than 9 or 8 is more than 10
- 7 is more than 3 and 7 is less than 10
- 5 is less than 5 or 5 is more than 5
- 6 is equal to 6 and 6 is more than 1
- 2 is more than 5 or 2 is less than 3
3.A condition says: not (the number is more than 10). The number is 3. Is the condition true?
- a) No
- b) There is no way to tell
- c) Yes
- d) Only when the number is 10
4.A program says: if the mark is less than 33 or the attendance is less than 75, print "Not allowed"; otherwise print "Allowed". The mark is 90 and the attendance is 80. What does it print?
5.A program says: if the number is not more than 10, print "Small"; otherwise print "Large". The number is 30. What does it print?
6.A program says: if the number is more than 10 and less than 20, print "Middle"; otherwise print "Outside". The number is 12. What does it print?
7.A program says: if the mark is less than 33 or the attendance is less than 75, print "Not allowed"; otherwise print "Allowed". The mark is 20 and the attendance is 95. What does it print?
8.A condition says: the number is more than 10 and the number is less than 20. The number is 15. Is the condition true?
- a) Only if the two halves are equal
- b) There is no way to tell
- c) Yes
- d) No
Combining conditions with and, or and not · Grade 7 Computer Science · www.arenapublications.com/learn
Answer keys — Grade 7 Computer Science
In the same order as the worksheets.
Bigger binary numbers
- 1. d) 15
- 2. c) 8
- 3. 54
- 4. 1. 101 2. 1010 3. 1101 4. 10001 5. 100100
- 5. c) 256
- 6. 32
- 7. 44
- 8. 10100
Adding binary numbers
- 1. 10001
- 2. 1. 10 + 1 2. 11 + 10 3. 100 + 11 4. 110 + 100 5. 1000 + 101
- 3. 100
- 4. 1001 + 1001 → Produces a carry; 10 + 1 → No carry; 11 + 1 → Produces a carry; 100 + 10 → No carry; 101 + 11 → Produces a carry; 1000 + 111 → No carry
- 5. 1 + 10 → 11; 11 + 11 → 110; 100 + 100 → 1000; 101 + 10 → 111; 1001 + 11 → 1100
- 6. 100000
- 7. a) 4
- 8. 10000
Reading spreadsheet formulas
- 1. 5
- 2. c) 4
- 3. 16
- 4. 36
- 5. 5
- 6. =A1+A2 → 14; =A1-A2 → 6; =A1*A2 → 40; =A1/A2 → 2.5; =A2*A2 → 16
- 7. =A1+A2 → Adds; =B2*B3 → Multiplies; =SUM(C1:C5) → Adds; =D1*D2 → Multiplies; =A4+B4 → Adds; =E1*E2 → Multiplies
- 8. 21
The internet and the web
- 1. 3
- 2. 2
- 3. b) Opening a file kept on the school's own lab network
- 4. b) Opening a page it has never opened before
- 5. b) The web is one of the things carried, and not the carrier itself
- 6. 1. The address is typed in and entered 2. A request for that page travels out across the network 3. The machine holding the page finds the one that was asked for 4. A copy of the page travels back 5. The browser draws the page on the screen
- 7. Reads the address that was typed in → The browser; Stores the page until somebody asks for it → The machine holding the page; Paints the words and pictures onto the screen → The browser; Picks out the right page from the ones it holds → The machine holding the page; Starts the request off → The browser; Answers with a copy of the page → The machine holding the page
- 8. c) One, and each visitor is sent a copy of it
HTML attributes and links
- 1. c) Books is the text; library.html is the destination
- 2. 3
- 3. kite.png
- 4. href → Which page the link opens; src → Which file a picture comes from; alt → Words to use in place of a picture; width → How wide to draw a picture
- 5. b) href="home.html"
- 6. b) Words describing the picture, for a reader who cannot see it
- 7. 4
- 8. <p> → Carries none; <a href="home.html"> → Carries an attribute; <img src="sun.png"> → Carries an attribute; <b> → Carries none; <h1> → Carries none; <a href="math.html"> → Carries an attribute
HTML lists and tables
- 1. <ul> → A whole list with a bullet against each item; <ol> → A whole list with a number against each item; <li> → One item of a list; <tr> → One row of a table; <td> → One cell of a table
- 2. 6
- 3. 15
- 4. b) <ul><li>Milk</li></ul>
- 5. 10
- 6. 6 — Row 2, cell 3
- 7. </li>
- 8. d) <ol>
Variables in a program
- 1. add 4 to score → 10; take 4 away from score → 2; set score to 4 → 4; set score to score times 4 → 24; add score to score → 12
- 2. d) 18
- 3. d) 7
- 4. 3
- 5. add 5 to total → Changes it; print total → Leaves it as it was; set total to 0 → Changes it; show total on the screen → Leaves it as it was; take 2 away from total → Changes it; compare total with 10 → Leaves it as it was
- 6. 10
- 7. d) 40
- 8. 8
Tracing a loop with a total
- 1. 22
- 2. 16
- 3. d) The total keeps everything added before it, so it comes to 12
- 4. 60
- 5. c) One
- 6. 24
- 7. 21
- 8. repeat 4 times: add 9 to total → Above 30; repeat 3 times: add 5 to total → 30 or below; repeat 8 times: add 5 to total → Above 30; repeat 2 times: add 8 to total → 30 or below; repeat 7 times: add 6 to total → Above 30; repeat 5 times: add 4 to total → 30 or below
Choosing between more than two things
- 1. Silver
- 2. 1. test whether the number is more than 100, and print "Huge" if it is 2. test whether the number is more than 10, and print "Big" if it is 3. if neither test held, print "Small"
- 3. a) Big
- 4. Gold
- 5. Silver
- 6. Positive
- 7. Try again
- 8. 20 → Adult; 13 → Teenager; 9 → Child; 3 → Toddler
Combining conditions with and, or and not
- 1. b) No number at all
- 2. 7 is more than 3 and 7 is less than 10 → True; 4 is more than 5 and 4 is less than 9 → False; 2 is more than 5 or 2 is less than 3 → True; 8 is more than 9 or 8 is more than 10 → False; 6 is equal to 6 and 6 is more than 1 → True; 5 is less than 5 or 5 is more than 5 → False
- 3. c) Yes
- 4. Allowed
- 5. Large
- 6. Middle
- 7. Not allowed
- 8. c) Yes
Grade 7 Computer Science · www.arenapublications.com/learn