Special features Higher-order questions promote critical thinking skills. Collaborative activities encourage students to learn from each other and foster teamwork. More practices enable students to reinforce their understanding of the topic. Solving puzzles and brain-teasers helps to develop problem-solving skills and boost logical thinking. Video-based information engages viewers and enhances learning experience. Game-based learning incorporates problem solving and critical thinking skills. Extra relevant information helps in understanding the topic better. A summary helps students to identify the main ideas of the topic. ? Contents Chapter 1 Logical thinking 1 Chapter 2 Games in computing 25 Chapter 3 Searching for information efficiently 48 Chapter 4 Safe use of information and communication technology 57 Let’s Play 74 ii Computing Science Primary 6
Chapter 1 Mimi, Jones and Matthew have similar books of 240 pages. They want to find out who can open the book to a randomly-picked page the fastest. They need to open the book to page 100. How do they find that page fast? Steps in logical thinking If you were them, what method would you use to find that page fast? Logical thinking Mimi starts from the first page. She flips the pages one by one until it reaches page 100. 1, 2, 3, 4, 5, 6, ,7 ,8, 9, 10, ..., 100 Jones randomly flips the book looking for page 100. 27, 200, 56, 70, 112, 140, 90, ..., 100 Matthew starts from the first page. Then, he flips a few pages each time until he reaches page 100. 1, 15, 20, 29, 34, 46, 58, 67, 79, ..., 100
When solving any problems, we should incorporate logical thinking. Logical thinking is a way of thinking in a proper or disciplined manner that is based on facts and evidence. With logical thinking, we can come up with better solutions. Is your method different from the above? Find out which is faster. Generally, there are five steps in solving a problem with logical thinking. They are: 1. Identifying the goal – What do you need to do or solve? 2. Identifying the information given – What is the information given? 3. Identifying the conditions given – What are the conditions? 4. Identifying the logic – Why must certain ways be carried out? 5. Identifying the solution – How do you solve the problem? Let’s use these steps to solve the problem faced by the children. 1. Identifying the goal To open the book to a page fast 2. Identifying the information given The book has 240 pages. 3. Identifying the conditions given To open the book to page 100 fast 4. Identifying the logic Page 100 is near the middle of the book which is page 120. 5. Identifying the solution Step 1 - Open the book to its half. Step 2 -Then, flip backward to page 100. 2 Computing Science Primary 6
There are three shapes in a sequence. What is the next shape? 1. Identifying the goal 2. Identifying the information given 3. Identifying the conditions given 4. Identifying the logic 5. Identifying the solution 1 Chapter 1 3 Logical thinking
Solving simple problems with logical thinking Guessing a number generated by a computer The computer will select a number between 1 and 16. A user will try to guess the number in not more than 4 times. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 The computer will notify the user if the guess is correct, too high or too low. The flow chart below is the algorithm of the computer program . Start End Generate a number between 1 and 16 randomly Say ‘Your guess is correct.’ Input a guess by the user Say ‘Your number is too high.’ Say ‘Your number is too low.’ Guess = number? Guess > number? 4 times? Yes Yes No No Yes No 4 Computing Science Primary 6
How will you guess the number? Will you guess 1, then 2, then 3 and so on, until you get the correct number? If the computer selects 1, then you are correct at the first guess. However, if the computer selects 16, then you need 16 guesses. Let’s use the logical thinking steps to solve this problem. 1. Identifying the goal To guess a number 2. Identifying the information given The numbers are between 1 and 16. 3. Identifying the conditions given Limited to not more than 4 tries 4. Identifying the logic Always select the number that is halfway between the highest and the lowest numbers. In this way, we will eliminate half of the possibilities. 5. Identifying the solution Let’s say the number is 11. Step 1 – Choose 8 (halfway between 1 and 16). The computer will say ‘Your number is too low.’ Step 2 - Choose 12 (halfway between 8 and 16). The computer will say ‘Your number is too high.’ Step 3 – Choose 10 (halfway between 8 and 12). The computer will say ‘Your number is too low.’ Step 4 – Choose 11 (halfway between 10 and 12). The computer will say ‘Your guess is correct.’ This method is very useful when we need to guess a number from a very wide range of numbers. Visit this website to play ‘Guess the number’ game. You may change the range of numbers. http://tiny.cc/dhozhz Chapter 1 5 Logical thinking
Calculating time taken for a journey 12 km A B A cyclist cycles from point A to point B. If he cycles at the rate of 10 km/h, how much time will the cyclist take to cycle from point A to point B? Let’s use the steps to solve this problem. 1. Identifying the goal To find the time taken by the cyclist 2. Identifying the information The distance between point A and point B is 12 km. 3. Identifying the conditions given His speed is 10 km/h. 4. Identifying the logic In an hour, he cycles 10 km. To cycle 12 km, he will take more than 1 hour but less than 2 hours. 5. Identifying the solution Time taken = 12 10 x 60 minutes = 72 minutes or 1 hour and 12 minutes However, if the cyclist takes a rest of 15 minutes during his journey, how much time will he take to finish the journey? Time taken = ( 12 10 x 60 minutes) + 15 minutes = 87 minutes or 1 hour and 27 minutes Speed = How fast we travel = Distance covered in a unit of time or Distance Time taken Chapter 1 7 Logical thinking
Father drove from City A to City C passing through City B. He started his journey at 13.00 hours. He stopped at City B for a 30-minute lunch. A 30 km 45 km B C If he drove at the speed of 90 km/h, what time would he reach City C? Let’s use the steps to solve this problem. 1. Identifying the goal To find the time Father reached City C 2. Identifying the information The distance between City A and City C is 75 km. He stopped for 30 minutes for lunch. 3. Identifying the conditions given His speed is 90 km/h. 4. Identifying the logic In an hour, he drove 90 km. To drive for 75 km without stopping, he would take less than 1 hour. 5. Identifying the solution Time taken for driving = 75 90 x 60 minutes = 50 minutes Total time taken for the whole journey = 50 + 30 minutes = 80 minutes or 1 hour 20 minutes Father would reach City C at 14.20 hours. 8 Computing Science Primary 6
Riddle 4 You are given two fishbowls. The fishbowls have the capacities of 5 liters and 3 liters respectively. There is a large tub of water. Now, how are you going to measure exactly 4 liters of water with the two fishbowls only? Let’s use the steps below to solve this problem. 1. Identifying the goal To find out how to measure 4 liters of water 2. Identifying the information A fishbowl has a capacity of 5 liters. Another fishbowl has a capacity of 3 liters. 3. Identifying the conditions given By using the two fishbowls 4. Identifying the logic We need to pour away 1 liter of water from the big fishbowl filled with water. The difference in capacity of the fishbowls is 2 liters. When the small fishbowl is filled with 2 liters of water, it still needs 1 liter of water to reach its brim. 5. Identifying the solution Fill up the big fishbowl with water and pour it into the empty small one. Now, the big one contains only 2 liters of water. 5 liters of water 2 liters of water 0 liter of water 3 liters of water Chapter 1 13 Logical thinking
Then, empty the small fishbowl. Pour the 2 liters of water from the big fishbowl into the small empty fishbowl. Fill up the big fishbowl again. Lastly, pour the water from the big fishbowl to fill up the small fishbowl which contains 2 liters of water. In the end, you will have 4 liters of water in the big fishbowl. 2 liters of water 0 liter of water 0 liter of water 2 liters of water 5 liters of water 4 liters of water 2 liters of water 3 liters of water You are given two fishbowls. The fishbowls have the capacities of 5 liters and 2 liters respectively. There is a large tub of water. Now, how are you going to measure exactly 4 liters of water with the two fishbowls only? 4 14 Computing Science Primary 6
1. Identifying the goal 2. Identifying the information 3. Identifying the conditions given 4. Identifying the logic 5. Identifying the solution Chapter 1 15 Logical thinking
Riddle 5 Jamie : This is not your money! Lily : Yes, it’s mine. Where did you get it? Jamie: I found it between pages 133 and 134 of the thick storybook. Lily : No... you are lying. I can prove it. How did Lily know that Jamie was lying? Let’s use the steps to solve this problem. 1. Identifying the goal To find out how Lily knew Jamie was lying 2. Identifying the information Jamie claimed that she found the money. Lily claimed the money was hers. 3. Identifying the conditions given The money was found between pages 133 and 134 of a book. 4. Identifying the logic Most books have odd-numbered pages on the right and evennumbered pages on the left when opened. 5. Identifying the solution Nothing can be found between pages 133 and 134 of a book when the book is opened. This is because they are both on the same sheet. When a book is opened, the pages on the right will always have odd numbers. The pages on the left will always have even numbers. 16 Computing Science Primary 6
On the first day of school, a Science teacher was murdered. The police had four suspects. These were their replies when the police asked about their whereabouts that morning. Principal : I was in the office doing some paperwork. English teacher : I was conducting a mid-year exam. Gardener : I was cutting grass near the school gate. Music teacher : I was re-examining the musical instruments. The police immediately identified and arrested the murderer. Who was the murderer and how did the police know? 1. Identifying the goal 2. Identifying the information 3. Identifying the conditions given 4. Identifying the logic 5. Identifying the solution 5 Chapter 1 17 Logical thinking
Riddle 6 A father, a mother and their children - a son and a daughter were on one side of the river. They wanted to cross the river. There was no bridge. There was only a small boat. The boat could only carry either one adult or two children at one time. How were they going to cross the river with the boat? Let’s use the steps below to solve this problem. 1. Identifying the goal To find out how the 4 family members cross the river 2. Identifying the information 2 adults and 2 children wanted to cross the river. There was no bridge but only a boat. 3. Identifying the conditions given The boat could only carry an adult or two children at a time. 4. Identifying the logic Firstly, two children would travel on the boat to the other side. One would stay back and the other would return. An adult cannot travel first as this would end up with no one to bring the boat back. A child would need to bring the boat back each time. 5. Identifying the solution Here is the diagrammatic solution with the keys: Boat leaving Boat returning F Father M Mother C Son C Daughter 18 Computing Science Primary 6
F M C C F M C C F C M C F C C M F C C M F C M C C F M C C C M F C C M F River One side of the river The other side of the river Are there any other solutions? If yes, discuss with your friends. Chapter 1 19 Logical thinking
A farmer buys a wolf, a goat and a cabbage from a market. He must take them to cross the river in his boat to go home. However, his boat can only fit himself and one of his purchases. He cannot leave the wolf with the goat as the wolf will eat the goat. He cannot leave the goat with the cabbage as the goat will eat the cabbage. How is he going to get everything across the river without anything being eaten? 1. Identifying the goal 2. Identifying the information 3. Identifying the conditions given 4. Identifying the logic 6 20 Computing Science Primary 6
Chapter 2 We can use Scratch to create interactive and interesting games such as... Games in computing ...animating letters. ...typing games. ...maze games. ...chasing games. ...calculation activities. Animating letters Changing color of the letters Open Scratch. We want a letter to change its color when it is clicked. Firstly, choose a letter as the sprite. Then, arrange the blocks on the next page. A note for teachers To download the Scratch software onto your computer, go to http://tiny.cc/gpozhz for Windows operating system and http://tiny.cc/brozhz for Macintosh operating system. Windows Mac
Try clicking on the letter. Its color changes each time we click on it. http://tiny.cc/kct2hz 26 Computing Science Primary 6
Here are some instruction blocks which we can use to ... ...spin the sprite when the up arrow key is pressed. http://tiny.cc/5gt2hz http://tiny.cc/ejt2hz http://tiny.cc/tlt2hz http://tiny.cc/dot2hz ... play a sound when the letter c on the keyboard is pressed. ... change the size of the sprite when the space bar is pressed. ..glide the sprite around when the green flag is clicked. Chapter 2 27 Games in computing
Write a script to animate a four-letter word. You have to make the letters spin, change its size, change its color and glide around. Create a colorful backdrop too. Animate the word creatively. 1 First letter Third letter Second letter Fourth letter http://tiny.cc/qqt2hz 28 Computing Science Primary 6
Chasing games We can create a game by moving a sprite using the arrow keys to chase another sprite that moves randomly. We can move the first sprite with these blocks. For the second sprite, we need it to move randomly. We can use these blocks. We can change the speed of the second sprite by adjusting the number in the WAIT block. The smaller the number, the faster the sprite will move. Why does the sprite move faster when the number in the WAIT block decreases? Chapter 2 29 Games in computing
We can also add a scoreboard to keep track of the number of times the second sprite is touched by the first sprite. In the cat sprite’s script above, we add the blocks to keep track of the number of times the cat sprite touches the bat sprite. Write the script to make a sprite chase another sprite that moves randomly. Put in a scoreboard to keep track of the number of times the sprites touch each other. Play a sound when they touch each other. 2 http://tiny.cc/wrt2hz 30 Computing Science Primary 6
Maze games We can create a simple maze game as shown below. We need to guide the cat sprite by using the arrow keys to reach the fish sprite. The cat sprite cannot walk through the walls and barriers. How are we going to program the cat sprite to do so? Chapter 2 31 Games in computing
Firstly, we need to create the maze first. Remember to draw a wall around the maze to prevent the sprite from leaving the maze. Then, draw the barriers. With the script below, when the cat sprite touches the wall and barriers, it will move a few steps back, not allowing it to walk through them. 32 Computing Science Primary 6
We need to repeat the instruction blocks for the other three directions for the cat sprite. We can easily duplicate the blocks with a right click. We can add fun to the game by getting the cat sprite to say ‘Yummy!’ when it reaches the fish sprite. Why do we need to use the FOREVER block for the cat sprite to say ‘Yummy!’ when it touches the fish sprite? Chapter 2 33 Games in computing
Watch the video. Write a script for a similar maze game. Make it as interesting as possible. 3 Always debug your coding if the result is not as expected. You can do it with a partner. Do not give up easily. http://tiny.cc/nwt2hz 34 Computing Science Primary 6
Typing games We can create a simple typing game with Scratch. In this game, the computer will display a letter at a time and the user will need to enter the letter displayed. There is a scoreboard to keep track of the score. We will set a time limit for the game. Firstly, we choose two backdrops, one for the game backdrop and one for the Game Over backdrop. We create a variable called timer. Chapter 2 35 Games in computing
We set the timer to 10 seconds for the game. When the green flag is clicked, the backdrop is changed. The timer automatically reduces the value shown every second. When the value is zero, the backdrop is changed and the game stops. For this game, the computer will randomly display 3 letters which are A, B and C. We need to use the BROADCAST block to activate the receiving sprites. PICK RANDOM block can randomly pick and activate a sprite. We can also add a scoreboard here. 36 Computing Science Primary 6
When A sprite receives the broadcast, it will appear and wait for the user to enter the letter A. When the user does so, one point is added to the scoreboard and the letter A will disappear. Then, it will randomly broadcast to activate other receiving sprites. For B and C sprites, they have similar codes too. Make sure you hide all the sprites when the game begins. http://tiny.cc/ott2hz Chapter 2 37 Games in computing
Firstly, we will set two variables for the two numbers the user needs to enter. Then, we will need to program the computer to find a common factor that can divide both the numbers without leaving any remainder. We will use the MOD block. Then, we need to keep increasing the value of the common factor to find the HCF. The possible HCF could be the smaller number of the two numbers but it cannot be greater than the smaller number. We use the loop here to repeat the search. What is the K variable in the script above? What does it represent? Chapter 2 41 Games in computing
Finally, we can improve the interaction experience of the user with the computer as shown below. http://tiny.cc/u1t2hz 42 Computing Science Primary 6
Based on the previous codes for the calculation of HCF, can you code the calculation of LCM? Lowest common multiple of two numbers The lowest common multiple (LCM) of two or more numbers is the smallest common multiple of the numbers. For example, we take 3 and 4. Multiples of 3 : 3 , 6 , 9 , 12 , 15 , 18 , 21 , 24 , 27 , 30 , 33 , 36 ,... Multiples of 4 : 4 , 8 , 12 , 16 , 20 , 24 , 28 , 32 , 36 ,... 12, 24, 36, ... are the common multiples of 3 and 4. 12 is the LCM of 3 and 4. Here we need to understand a few points about the multiples and the LCM of any two or more numbers: The smallest multiple of the number is the number itself. For example, the smallest multiple of 3 is 3. the smallest multiple of 4 is 4. The common multiples are divisible by both the numbers without leaving any remainder. For example, 12 ÷ 3 = 4 12 ÷ 4 = 3 24 ÷ 3 = 8 24 ÷ 4 = 6 36 ÷ 3 = 12 36 ÷ 4 = 9 The LCM is the first common multiple of the two numbers when the common multiples are arranged in ascending order. For example, the common multiples of 3 and 4 when arranged in ascending order is 12, 24, 36, .... Therefore, 12 is the LCM of 3 and 4. Chapter 2 43 Games in computing
Firstly, we create two variables for the two numbers the user needs to enter. Then, we need to find the multiples of the two numbers. Based on the block below, the product of Num2 and K variable is a common multiple of both Num2 and Num1 as when it is divided by Num1, it leaves no remainder. Now, we need to find the first common multiple when the common multiples are arranged in ascending order. Here we use the loop function to repeat the search. Can we interchange Num1 and Num2 in the block above? 44 Computing Science Primary 6
Based on what you have learnt, now create a script to calculate the lowest common multiples when the user enters two numbers. Make the interaction as friendly and interesting as possible. 5 http://tiny.cc/04t2hz Chapter 2 45 Games in computing
1. We can use Scratch to make interactive games such as animation of letters, typing games, maze games, chasing games and calculation activities. ? Create a ping pong game with Scratch. The ball moves randomly and bounces when it hits on the green walls and paddle. The user uses the left and right arrow keys to control the paddle, preventing the ball from hitting the purple wall. When the ball hits the purple wall, the game ends. http://tiny.cc/w6t2hz 46 Computing Science Primary 6
Chapter 3 Searching for information efficiently Search engines This library is huge and has many books. If you want to find a book, you can ask the librarians for help. The concept is similar to the Internet. There is a lot of information on the Internet. How do you search for a particular information online? We use search engines to search for information on the Internet.
Search engines are software that helps us search for information on the Internet based on our query. There are many different search engines. If we perform a specific search with each of them, they will give similar but not identical results. In any search engine, we can enter one or more search terms or keywords related to the information that we are searching for. Let’s say we are searching for information on how to cook spaghetti. As we type the term ‘recipe’, it displays search predictions of other possible searches in a drop-down list as shown above. Chapter 3 49 Searching for information efficiently
When we click the Enter button, it gives a list of relevant websites. We can click on a website that looks interesting and related to our search. If we are looking for something more specific such as an image, a video, a map or news, we can click on the options that are usually listed at the top. When we see an image, a video, a map or news that we are interested in, we can click on it to visit its website. 50 Computing Science Primary 6
We can use a few advanced search techniques to narrow down our search results. By using quotation marks around the search term, the search engine will give results that contain these words together in the exact order, and not as separated words. For example, when we enter “carpet shark”, it gives websites that contain the phrase carpet shark, not just carpet or shark. We can also add $ sign in front of a number when we are searching for a price. This will exclude contents about age, era and amount. We can also add in the decimal point for exact prices. Chapter 3 51 Searching for information efficiently
Take note of the publication time of the websites shown above. We can get the filter to sort the search results by dates the websites were updated or published. Most search engines have this feature. For instance, if we select ‘Past hour’, it will display websites updated within the past hour. 52 Computing Science Primary 6
We can also specify the range of dates of publication by clicking on the ‘Custom range’. Discuss the feature of a search engine that allows the sorting of the search results by dates and time. Is it important? Give your reasons. What are the types of information involved when you use this feature? 1 Chapter 3 53 Searching for information efficiently
Evaluating information reliability When we have found some information on the Internet, we need to evaluate the information as not all information found online is fair and accurate. Here are some attributes of reliable information. It is meant to inform the schoolchildren or public. The author is qualified with strong credentials in that field. The sources are mentioned and reliable. It is consistent with other information found elsewhere. It presents both its pros and cons. Purpose Is it for specialists, public or schoolchildren? Is it to explain, inform or sell a product? Are the terms used suitable? Authority Who is the author? What are his or her qualifications and credentials? Is he or she an expert in that field? Accuracy Is it consistent with other information found in other sources? Are the sources mentioned? Is it published or updated recently? Objectivity Is the author biased? Is it a fact or the author’s opinion? Does it list both its pros and cons? How to evaluate information found online 54 Computing Science Primary 6
1. Search engines are software that helps us search for information on the Internet based on our query. 2. We enter keywords or search terms in the search engines. 3. We can list the search results either based on images, news, maps or videos. 4. We can use some advanced search techniques such as a. quotation marks around the term. It gives websites that contain those words in the exact order as entered. b. $ sign in front of a number. It gives websites that contain that price, excluding the age, era and amount related to the number. 5. We can sort the search results by dates and time. 6. When we evaluate the information found online, we need to verify its purpose, authority, accuracy and objectivity. ? 1. (a) What is a search engine? (b) Why do we need it? (c) Name two common search engines. Chapter 3 55 Searching for information efficiently
2. Jimmy wants to find information about peanut butter sandwiches online. The search result should show only websites with the phrase peanut butter sandwiches, in this particular order. How should he enter his search term in a search engine? 3. One of the advanced search techniques of search engines is the use of $ sign. Explain how it is used. 4. List the four main aspects we should take note of when we are evaluating information obtained online. 56 Computing Science Primary 6
Chapter 4 The Internet is one of the most exciting and powerful inventions in modern history. It provides access to information at our fingertips and allows world-wide communication instantly and almost at no cost. Safe use of information and communication technology However, many studies show that excessive exposure to this technology has great negative effects on our life. In the previous levels, we studied about cyberbullying, sexual grooming and cybercrimes. These are some of the dangers of using the Internet. Now, we are going to learn about other dangers such as Internet addiction, malware attacks and installation of software from unknown sources.
58 Computing Science Primary 6 Read the newspaper cutting shown above. Discuss the following. Why did the son kill his father? Why did the father berate his son? Is playing online games not acceptable? Is playing online games a waste of time? What does ‘online gaming addiction’ mean? Is online gaming addiction a serious problem among us? Are there ways to overcome this problem? Internet addiction 1 Black-hearted son murders his police officer father who berated him for being a waster over internet gaming Patricide in Surat Thani: Son is being detained at the Surat Thani juvenile centre where he is being interviewed by specialists and police officers after he stabbed his father twice in the back in the kitchen of their home when he returned from work. The son of a local police sergeant major is being questioned in Surat Thani by the police and specialists after being arrested on Saturday for taking his own father’s life in a violent and cowardly attack after his parent had earlier in day berated him for wasting his time pursuing his online gaming addiction. Source: Thai Examiner.com dated 9 Dec 2019 Watch this video that tells a story of a young online gaming addict. http://tiny.cc/mjboiz What is online gaming addiction? Can we get addicted to online gaming?
Chapter 4 59 Safe use of information and communication technology Many people are spending too much time on computers, so much so that some other areas of their life suffer. They cannot find a balance between their online time and offline time. This new syndrome is known as Internet addiction. There are a few types of Internet addiction: Internet gaming – It includes all types of games played online. Internet gambling – It includes online card games, sport betting and casino games which involve money. Internet pornography – It includes online pornography, adult websites and chat rooms. Information overload – It includes searching and collecting a wealth of information from the Internet. Internet compulsive buying – It includes excessive amount of time and money spent on online shopping. 10 minutes later... 20 minutes later... Son, better go and bathe now. Stop playing with the computer. Stop playing with the computer! Go and bathe now. Son, I am going to unplug the computer if you are still glued to it! Ok, Mum. Wait for a while... Ok, going... Ok. Ok.
60 Computing Science Primary 6 Are you addicted to the Internet? Tick (✓) these statements sincerely. 2 If there are more ticks on the Sometimes and Often columns, you might be suffering from Internet addiction. Why do people get addicted to the Internet? Brainstorm. Rarely Sometimes Often 1. When I am using the device, I lose track of time and I am surprised when I realize the time spent on the Internet. 2. I have tried to reduce the time spent on the devices but it is very hard. 3. When I am not online, I always wonder if I have missed any messages, news or posts. 4. I am always upset or frustrated when others disturb me while I am online. 5. My family members and relatives always say I spend too much time online. 6. I feel that my life will not be interesting and happy if I have no access to the Internet.