The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.
Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by PENERBITAN PELANGI SDN BHD, 2023-11-02 04:28:44

ebook Computing Science Primary 5

ebook Computing Science Primary 5

Special features Contents Chapter 1 Solving problems with logical thinking 1 Chapter 2 Conditionals 13 Chapter 3 Data processing 32 Chapter 4 Internet 50 Let’s Play 74 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. ? ii Computing Science Primary 5


Chapter 1 Solving problems with logical thinking Mimi received a set of six hollow wooden dolls. They have different sizes and can be placed inside each other. Arranging things Now, Mimi wants to place them inside each other. How could Mimi do it correctly and fast? Should she first arrange the dolls? If so, how should Mimi arrange them? Visit this website to see how the hollow wooden doll set or Matryoshka is placed one inside another. http://tiny.cc/yyyygz


First, Mimi can either arrange the dolls based on their sizes in ... By arranging the dolls based on their sizes, Mimi can easily place the smallest doll into the doll next to it, and then into the doll next to it and so on. Can we still manage to place them inside each other if we do not arrange them in order first? Surely we can still manage to do so. It might take a little bit longer as we will be searching for the next doll to put the doll or dolls. We can use the ‘matryoshka way’ to pack our things for a trip or even for relocation. This will save some space. ...ascending order ...descending order After moving into a new house, many boxes of different sizes are left behind. You need to pack the boxes to reduce the space taken up by them. How are you going to pack them without dismantling them? 2 Computing Science Primary 5


We should use logical thinking whenever we are trying to solve a problem. Logical thinking is a way of thinking in a proper or disciplined manner that is based on facts and evidence. This will produce better solutions. Here is a problem. There are many dirty plates and bowls in the sink. Your mother asks you to wash them and arrange them properly into the cupboard. How would you arrange the plates and bowls? We can stack them based on their sizes. Plates and bowls of similar sizes can be stacked up together respectively. Besides being neat and tidy, this arrangement allows us to grab the plates or bowls of the size we want quickly. Moreover, they are very stable and do not tumble easily. How are the books in a library arranged? Are they arranged by their sizes too? Chapter 1 3 Solving problems with logical thinking


The books in a library or a bookstore are usually arranged based on the genres or types. For example, there are sections for fiction and nonfiction. Therefore, if you are looking for books about cars or plants, then you should head over to the non-fiction section. What will happen if the books are arranged based on their sizes? If so, we will need to know the size of the book we want before looking for it in the library or bookstore. Will this work? Why? Get into groups of six. Design a wardrobe. Discuss how your team would arrange the clothes in the wardrobe. Are you going to arrange them by their sizes, colors, types or materials? Present your design. Explain your reasons. 1 4 Computing Science Primary 5


Arranging steps to complete a task What will happen if the sequence is altered as shown below? 1. Vacuum the inner part of the car. 2. Wipe the inner part of the car with a moist cloth. 3. Wet the car thoroughly. 4. Apply soap and wash the car starting from the top. 5. Rinse the car with water. 6. Dry the car with a dry cloth. Have you helped your father to wash the car before? Are there any steps to follow? These are the general steps to wash a car: 1. Wet the car thoroughly. 2. Apply soap and wash the car starting from the top. 3. Rinse the car with water. 4. Dry the car with a dry cloth. 5. Vacuum the inner part of the car. 6. Wipe the inner part of the car with a moist cloth. Chapter 1 5 Solving problems with logical thinking


Will we get a different result with this? The result will be almost the same. Cleaning the inner part of the car either before or after cleaning the outer part does not have much effect. Both parts can be cleaned at different sequences and each action does not affect the other action. Will the car be clean if the steps are jumbled a lot such as shown below? 1. Wet the car thoroughly. 2. Rinse the car with water. 3. Apply soap and wash the car starting from the top. 4. Dry the car with a dry cloth. 5. Wipe the inner part of the car with a moist cloth. 6. Vacuum the inner part of the car. The result will be different. Drying the car after washing it with soap and without rinsing it will cause scum to stay on the car, making the car not clean. We should vacuum the inner part of the car first before wiping it. Vacuuming process reduces the dust and therefore it makes our wiping task easier and more effective. In short, the sequence of steps in completing a task is important. There is logical explanation behind each step. If we jumble up the sequence, we might get a different result. Why do we need to wet the car before applying the soap? Similarly, why do we need to wet our body before applying the soap? 6 Computing Science Primary 5


During school holidays, Mother sets a few chores for her kids to do at home. They are: Collecting the dry clothes from the clothes line Making the bed Sweeping the floor Wiping the shelves Mopping the floor Hanging the clothes to dry on the clothes line Get into groups of five. If you were her kids, how would you sequence the chores? Discuss among your members. Present your sequence of the chores. Remember to include your reasons for your sequence. 2 Completing Sudoku Sudoku is a number puzzle, meant for a single player. Although it is about numbers 1 to 9, it is not about Mathematics. It is more about logic. In a classic Sudoku, it is made up of a grid of 81 cells with 9 blocks. Each block has 9 cells. The puzzle comes with some cells filled in with numbers as shown above. 1 6 3 6 3 1 9 1 3 6 2 7 3 7 6 9 2 2 8 9 1 3 5 8 9 3 5 2 62 4 A cell A block A row A column Chapter 1 7 Solving problems with logical thinking


We need to fill up the cells with numbers 1 to 9 once in every row, column and block. The numbers in red are the solution. Look at the number 8 in the middle block. It appears once in its row, column and block. Each Sudoku puzzle has only one set of solution that can be reached using logical thinking. No guessing is required here. There are many different types of Sudoku that have been developed. Some use colors, symbols and pictures instead of numbers. Some are simplified to only 16 cells with 4 blocks of 4 cells each. 1 5 5 5 6 7 3 4 1 8 7 7 7 6 4 61 98 1 9 9 8 2 7 2 2 2 8 8 9 4 4 4 4 4 5 1 1 5 5 7 86 3 3 5 9 7 4 8 6 3 6 3 1 9 1 3 6 2 7 3 7 6 9 2 2 8 9 1 3 5 8 9 3 5 2 62 4 1 3 4 2 8 Computing Science Primary 5


Now, we will try to solve Sudoku with 16 cells. Analyze the puzzle below. Each row, column and block will have numbers 1 to 4 only. We will name the empty cells for our easy reference. We will start with cell C. Look at cell C and its row. The row is missing 4. So, cell C is 4. 1 4 2 2 3 3 1 2 1 4 2 2 D E 3 A B C F HG 3 1 2 1 32 C 1 4 2 2 D E 3 1 1 4 2 2 3 4 3 A B 4 F HG 3 1 2 Look at cells D and E. The columns are missing 3 and 4 respectively. So, cell D is 3 and cell E is 4. Now, you will get this. Which cell should you try to solve next? Why? Chapter 1 9 Solving problems with logical thinking


We should solve cell F next as it is the only missing number in that row. What is cell F? Try these Sudoku puzzles of 16 cells. Start with the easy level and then proceed to the hard level. http://tiny.cc/50s0gz When cell A is 1, we can find cells B and G. What are cells B and G? Finally, we can also solve cell H and the puzzle as a whole. 1 4 2 2 3 4 3 A B 4 1 HG 3 1 2 Analyze cell A. In its row, 1 and 2 are missing. In its column, 2 is there. Therefore, cell A is 1. 4 3 BA 1 4 2 2 3 4 3 1 2 4 1 34 3 1 2 10 Computing Science Primary 5


1. Here are some tasks that Mother wants Mimi to do when Mimi comes home from school. Watch television Play outdoor games Do homework or revision Have dinner Take a bath Sleep Water plants Pack school bag If you were Mimi, how would you arrange the tasks? Why would you arrange them in such a sequence? 1. We use logical thinking to arrange things, arrange steps in completing a task and solve Sudoku. ? Chapter 1 11 Solving problems with logical thinking


2. Solve these Sudoku puzzles. Try these Sudoku puzzles of 81 cells. Start with the easy level and then proceed to other levels if you can. http://tiny.cc/yiw0gz 2 3 1 4 1 1 3 2 4 1 9 3 6 8 5 1 1 6 4 7 2 2 8 7 1 2 7 7 7 6 7 5 3 9 4 1 9 3 1 2 8 12 Computing Science Primary 5


Chapter 2 Variables in computing Conditionals In Scratch, we can make the sprite respond with the information the user feeds in. Firstly, we need to allow the user to type in the information as shown below. Then, we create a variable to store the information. The information in the variable can be changed. We always give a sensible name to the variable.


Next, we need to store the information in the variable. Lastly, we can get the sprite to use the information in the variable. http://tiny.cc/6thvhz A note for teachers To download the Scratch software onto your computer, go to http://tiny.cc/ru00gz for Windows operating system and http://tiny.cc/zv00gz for Macintosh operating system. Windows Mac 14 Computing Science Primary 5


We can also insert the information from the user as part of the sprite conversation. The block from the Operators block menu is used to join 2 words or phrases or variables. We can also join multiple words, phrases or variables together. For example, What will the sprite with the above block say? http://tiny.cc/zxhvhz Chapter 2 15 Conditionals


Prepare the script below. Try to figure out what the sprite says before executing the script. http://tiny.cc/6zhvhz 16 Computing Science Primary 5


http://tiny.cc/61hvhz 1 If you execute your script and it does not give the correct results, always debug it. You may debug it with a friend. Prepare a script that makes the sprite interact with the user as shown below. Sprite: What is your name? User: Tommy Sprite: Hello Tommy. Sprite: What’s your favorite food? User: Burgers Sprite: What’s your favorite drink? User: Orange juice Sprite: Tommy likes to eat burgers and drink orange juice. Chapter 2 17 Conditionals


Conditionals in computing When writing programs for computers or coding, it is important to tell the computer when to perform a task. We use conditional statements. These statements tell the computer to perform different tasks depending if the conditions are true or false. The statements have the ‘if’ part and ‘then’ part and sometimes with ‘else’ part. A conditional statement usually has one condition and two possible outcomes. Look at the script below. When the user typed in the age as 11, the computer finds that the condition is true as 11 is smaller than 18. Therefore, the THEN code will run and the sprite will say ‘Hello children!’. On the other hand, if the user typed in 20, the THEN code is ignored as the condition is false. Do you realize that the conditional statements in computing are similar to the cause and effect concept? Condition Do that or do nothing Do this True False 18 Computing Science Primary 5


For the script below, when the user typed in 20 as the age, the sprite will say ‘Hello ladies and gentlemen!’ This is because the condition is false. The THEN code is ignored and the ELSE code will run. What happens if the user typed in 18 as the age? The condition is ‘age less than 18’. When 18 is typed in, it is not less than 18. Therefore, the THEN code is ignored and the ELSE code will run. The sprite will say ‘Hello ladies and gentlemen!’ The IF...THEN block and IF...THEN...ELSE block are from the Control block menu. Prepare the script below. What happens when you run it? The block comes from the Operators block menu. Chapter 2 19 Conditionals


When the first number is 20 and the second number is 40, the sprite will say ‘Your first number is smaller.’ What happens when the first number is 20 and the second number is 10? 20 Computing Science Primary 5


Write a script to ask the user to guess a number. You will have to decide a number and compare it with the number guessed by the user. 2 When the number typed in is smaller, the sprite will say... When the number typed in is larger, the sprite will say... When the number typed in is the same, the sprite will say... Chapter 2 21 Conditionals


Analyze the script below. What happens when the user typed in ‘False’? The condition is false as ‘False’ is not equal to ‘True’. Therefore, the sprite will say ‘Sorry. You’re wrong!’ What happens when the user typed in ‘True’? The condition is true. Therefore, the sprite will say ‘Well done!’ 22 Computing Science Primary 5


Prepare a script whereby the sprite asks if the user wants to see it dance. If the answer is ‘No’, then the sprite will say “Then, I will run.” and it will start to run. If the answer is ‘Yes’, then the sprite will start to dance. 3 http://tiny.cc/s4hvhz Chapter 2 23 Conditionals


When we divide 16 by 3, we get 5 with a remainder of 1. 16 ÷ 3 = 5 R 1 or 16 3 = 5 R 1 In computer language, the remainder of a division is known as modulo operator. In writing, modulo operator is often abbreviated as mod. For example, 16 ÷ 3 = 5 R 1 or 16 mod 3 = 1 25 ÷ 5 = 5 or 25 mod 5 = 0 2 ÷ 3 = 0 R 2 or 2 mod 3 = 2 Modulo operator tells us if a number is divisible by other number. 24 mod 4 = 0 This means 24 is divisible by 4. 21 mod 4 = 1 This means 21 is not divisible by 4. We can use this function to determine if a number is an odd or even number. Analyze the script below. 24 Computing Science Primary 5


The block is from the Operators block menu. When we execute the script... We can use the block from the Operators block menu to round the number to the nearest integer. We can round 120.39 to 120 and 120.8 to 121 with that block. Chapter 2 25 Conditionals


The above script will have the result rounded. If not, you may have results with many decimal places. If the user typed in 30 and 7, the answer should be 4.285714.... However, it has been rounded to 4. 26 Computing Science Primary 5


Write a script that will determine if there is any pencil left when 125 pencils are distributed evenly among a group of students. The user is required to type in the number of students. Your scripts should display the outputs shown below for the given inputs. 4 Input Output 75 There will be some left. 25 There will be none left. 80 There will be some left. Chapter 2 27 Conditionals


Prepare a script that calculates the estimated number of cookies in a bag. The user is required to provide the numbers of cookies and bags. The cookies are then divided evenly and placed in the bags. Round off the result to its nearest integer. Your scripts should display the outputs shown below for the given inputs. 5 Input Output Number of cookies Number of bags 87 11 8 159 6 27 1,258 36 35 28 Computing Science Primary 5


1. In computing, variables are places where information is stored and the information can be changed. 2. Conditional statements tell a computer to perform different tasks depending if the conditions are met or not. 3. In Scratch, the MOD block gives the remainder of a division operation and the ROUND block rounds a number to its nearest integer. ? 1. You are required to write a script that compares the areas of two rectangular boards. The user will have to type in the length and width of each of the boards. Your scripts should display the outputs shown below for the given inputs. Input Output First board Second board Length 12 Length 4 The first board is larger. Width 3 Width 5 Length 10 Length 8 The second board is larger. Width 5 Width 8 Length 5 Length 6 They have the same area. Width 12 Width 10 Chapter 2 29 Conditionals


2. The body mass index (BMI) is a measure that uses our height and mass to determine if our mass is healthy. It is calculated based on the following formula: BMI = Mass Height x height The mass is measured in kilograms and the height is measured in metres. Write a script to calculate the BMI of the data typed in by a user. Remember to have the BMI rounded. http://tiny.cc/57hvhz 30 Computing Science Primary 5


Chapter 2 31 Conditionals


Chapter 3 Processing data with Microsoft Excel Counting Teacher Joe received a file of students’ donation in Microsoft Excel as shown below. He wanted to know how many students donated. Data processing Teacher Joe can use the COUNT function in Microsoft Excel to do so. This function counts the number of cells that contain numbers or values in a range. For the above table, to count the number of students who donated, we use =COUNT(B2:M2) formula. This counts the number of cells that contain values in cells B2 through M2. When we press ENTER , it will give us 12. Do I have to count manually to find the number of students who donated?


To count the number of cells that contain values, text or error values, we use the COUNTA function. Basically, this function counts the number of cells that are not empty. The above formula will give 8 as only cell E1 is empty. Look at the data above. What will the formula of =COUNT(A1:I1) give? It gives 4 as cells B1, C1, E1, G1 and H1 do not contain values. How do we count the number of cells that contain both values and text? Do I have to count manually to find the number of students who donated 50 Baht? We can use the COUNTIF function to count the number of cells that match certain criteria. Let’s return to Teacher Joe with the donation file. What function in Microsoft Excel should Teacher Joe use if he wanted to count the number of students who donated 50 Baht? Chapter 3 33 Data processing


Teacher Joe can use the COUNTIF function in Microsoft Excel to do so as there is a criterion. He only wanted to find the number of students who donated 50 Baht. This formula counts the number of cells containing 50, that is the value in cell B2, from cell B2 through cell M2. The result is 3. Referring to the same donation file, we can use the formulas below to find different things. =COUNTIF (B2:M2 , B2) Formula Description Output =COUNTIF(B2:M2,”>40”) Counts the number of cells with a value greater than 40 in cells B2 through M2 4 =COUNTIF(B2:M2,”>=40”) Counts the number of cells with a value equal or greater than 40 in cells B2 through M2 5 =COUNTIF(B2:M2,”<>40”) Counts the number of cells with a value not equal to 40 in cells B2 through M2 11 =COUNTIF(B2:M2,”>”&B2) Counts the number of cells with a value greater than 50 (the value in B2) in cells B2 through M2 1 =COUNTIF(B2:M2,”<>”&B2) Counts the number of cells with a value not equal to 50 (the value in B2) in cells B2 through M2 9 The range of cells to count The criterion 34 Computing Science Primary 5


Match the formulas to their correct functions. Analyze the table below. 1 2 Find the results if the following formulas are used for the table above. (a) =COUNT(A1:G4)................................................................................. (b) =COUNT(D1:D4)................................................................................. (c) =COUNTA(G1:G4).............................................................................. (d) =COUNTA(A1:G4).............................................................................. (e) =COUNTIF(A1:G4,A1) ...................................................................... (f) =COUNTIF(A1:G1,”>”&C1)................................................................ (g) =COUNTIF(A1:G4,”<>300”) ............................................................. Count the number of cells with values COUNT Count the number of cells that are not empty COUNTIF Count the number of cells that meet the criterion COUNTA Chapter 3 35 Data processing


Now, we want to add the working hours of Anada and Chet. We can use the formula of =C2+C3 or =SUM(C2:C3). When we press ENTER , we will get the sum which is 88. Basic arithmetic operations In Microsoft Excel, we can carry out the basic arithmetic operations such as addition, subtraction, division and multiplication. Prepare a table of salary of 7 employees using Microsoft Excel as shown below. 36 Computing Science Primary 5


To find the difference in the working hours, we can subtract them. To sum up the working hours, we can use =SUM(C2:C8) by selecting the range instead of typing in =SUM(C2+C3+C4+C5+C6+C7+C8). When creating formulas in Microsoft Excel, make sure there is no space between the characters in the formulas. Chapter 3 37 Data processing


How do we find the wages of Wipa? We can divide her salary by her number of working hours. Take note that the / symbol means divide. Now, we need to find the salary of Anada by multiplying his wages by his number of working hours. We use =B2*C2. The * symbol means multiply. In order to find the salary of the rest of the employees, should we key in the similar formula? We can copy the formula down through cell D7 by clicking and dragging the small green square at the lower-right corner of the cell to cell D7. 38 Computing Science Primary 5


We can also use the AVERAGE function by typing in =AVERAGE(D2:D8). To find the average salary of the employees, we need to find the total salary and then divide it by 7 as there are 7 employees. We can key in =SUM(D2:D8)/7. All formulas in Microsoft Excel start with an arithmetic operator such as an equal sign (=). The answers to the formulas are displayed in the cells the formulas are entered. The symbols for addition, subtraction, multiplication and division are +, -, * and / respectively. Chapter 3 39 Data processing


1. Match correctly. 3 2. Open the Microsoft Excel file named ‘Costs of fruits’. Answer the questions in the file using the Microsoft Excel formulas. =SUM(A1:A10) Add all the values of G2 to G5 and then divide by 4 =B3*C5 Add all the values of A1 to A10 =AVERAGE(G2:G5) Divide C6 by F4 =C6/F4 Subtract I8 from T16 =T16-I8 Multiply B3 by C5 A note for teacherS To download the ‘Costs of fruits’ file, scan this QR code or go to http://tiny.cc/9aivhz . 40 Computing Science Primary 5


Sorting and filtering With Microsoft Excel, we easily sort or reorganize the data. Open the file named ‘Product codes’. Firstly, we want to arrange the codes from the largest to the smallest. We select a cell in the Code column. From the Sort & Filter in the Data tab, choose Sort Largest to Smallest . You will notice that the rest of the columns are rearranged accordingly. Therefore, the data are still valid. For columns with text, we can sort them alphabetically, either from A to Z or from Z to A. For columns with dates, we can sort them from the oldest to the latest or vice versa. note for teacherS To download the ‘Product codes’ file, scan this QR code or go to http://tiny.cc/fhivhz . Chapter 3 41 Data processing


Prepare a table of names, dates of birth and heights of your classmates in Microsoft Excel. Arrange the data in the table to find the first one on the list when the names are arranged in alphabetical order the tallest and the shortest students the youngest and the oldest students 4 Now, sort the product names from A to Z. Lastly, sort the product based on the last order dates starting from the latest one. 42 Computing Science Primary 5


We can also display the needed data and hide the rest from view. This is known as filtering in Microsoft Excel. We can filter one or more columns of the data. The table of data should have the header columns with the column names. Open the file named ‘Product codes’. Now, we are going to filter this table. Select the header column. Then, in the Data tab, select Filter . What is filtering in Microsoft Excel? How is it different from sorting? You will see a drop-down arrow in each of the header cells. Chapter 3 43 Data processing


Now, we want to display products that are drinks only. We click on the drop-down arrow in the Category cell. Click Food to deselect it and then select OK . It will display only the drinks. The rest are hidden as you can see there are some jumps in the row numbers. To display all the items, click on the drop-down arrow in the Category cell and select All . Then, select OK . 44 Computing Science Primary 5


Discuss with your classmates the differences between the SORT and FILTER functions in Microsoft Excel. Open the file named ‘Delivery of pens’. Using the SORT and FILTER functions, display the table as shown below. 5 6 A note for teacherS To download the ‘Delivery of pens’ file, scan this QR code or go to http://tiny.cc/rkivhz . Chapter 3 45 Data processing


Stages in data processing There are 6 stages in the data processing cycle. Collecting – Firstly, the data are collected by using questionnaires, observing or interviewing. Data can be collected from secondary sources such as government websites and journals. Preparing – The data collected need to be sorted and filtered. Redundant, incomplete or incorrect data should be removed. Input – The data are then fed into the computers either by using input devices such as a scanner or keyboard. Processing – The data are processed using suitable processing methods such as the SORT or FILTER function in Microsoft Excel. A few other methods may be used. Output – The processed data or information is presented in many different forms such as a printed report, video or audio. The output needs to be interpreted to be meaningful for the users. 46 Computing Science Primary 5


Storage – The information will be stored for future use. The storage system should be secured and allowed quick access and retrieval of the information. The information can be presented conventionally by preparing posters and reports. Now, much information is presented on the Internet via blogs. Number the stages in data processing accordingly. 7 Collecting Input Output Storage Processing Preparing Chapter 3 47 Data processing


ebook Computing Science Primary 5

Enter your Authorization ID to access.

Enter
Click to View FlipBook Version