T1 Worksheet 1
T1 Worksheet 1
T1 Worksheet 1
Unit 6 Algorithms
Task 1
1. Qwerty is a small island in the southern
hemisphere.
The Qwertian people have two types of people.
The ASCIIs who always say the truth and the
UNICODEs who always lie.
There are three people (A, B and C) in a
Qwertian coffee shop.
Ask them if they sleep, if they say yes they are ASCII, if they say no they are
UNICODE
1
Worksheet 1 Computational thinking
Unit 6 Algorithms
You need to fill the 5 litre jug with exactly 4 litres of water.
Write an algorithm to solve this problem
Estimate it
2
Worksheet 1 Computational thinking
Unit 6 Algorithms
3
Worksheet 1 Computational thinking
Unit 6 Algorithms
Task 2
1. “Beetle” is a dice game for two or more players, played with a single six-sided die.
The objective is to be the first to draw all parts of a beetle. At each turn, a player rolls the
die to decide which part can be drawn.
The body has to be drawn first, by throwing a 6. Head, legs and tail can then be drawn
when the correct value is shown on the die.
Eyes and antennae cannot be drawn until the head is drawn.
The first person to draw all the body parts is the winner.
Throw Part Count
Six Body 1
Five Head 1
Four Tail 1
Three Leg 4
Two Antenna 2
One Eye 2
You need to write a program to allow a player to play Beetle against the computer.
(a) Decompose this game into component parts using a structure diagram.
(b) Which sub-sections, if any, could be reused if you are asked to write a program for a
different dice game?
All of it
4
Worksheet 1 Computational thinking
Unit 6 Algorithms
Task 3
Find an Internet site that simulates playing a simple dice game, and decompose the steps in the
algorithm used to program the game.
e.g. http://www.playonlinedicegames.com/
Draw a structure diagram which shows how the game is decomposed.