Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Digital Book class-6 2nd edition With Coding

Digital Book class-6 2nd edition With Coding

Published by Memorica Graphics, 2023-03-29 15:45:25

Description: Digital Book class-6 2nd edition With Coding

Search

Read the Text Version

["String Operators Block In scratch, string operators blocks are used to perform the string operation. These blocks are also called reporters block. Operators Function Join two strings Return specified position of character from string Return length of string Sample Program-2 Let's create a program with the given set of instruction and test output result. Sample Program-3 Let's create a program with the given instruction and test output result. Smart Computer Science Book-6 245","List in Scratch A list is a tool that can be used to store multiple pieces of information at once. It can also be defined as a variable containing multiple other variables. A list consists of a numbers paired with items. It is also called an array in other programming languages. A reporter block with few uses; however, this can be used as a Stage Monitor Adds an item to the end of a list Deletes all items of a list Replaces an item in a list with a new item Reports the index in a list where a value first appears, or reports 0 if no list item has the value A boolean block that checks whether a list contains a given value Hides the specified list's stage monitor Deletes the item of a list with a given number, decreasing the numbers of later items by 1 Inserts an item at a chosen point in a list, increasing the numbers of later items by 1 A reporter block that reports the value of an item in a list A reporter block that reports how many items a list contains Shows the specified list's stage monitor 246 More on Scratch Coding","Creating a list To create a list, follow the following steps: Step-1\t:\t Click the 'Variables' section from the 'Code' tab. Step-2\t: \tIn the variables palette, click Make a List. A dialog box will appear. Step-3\t :\t Type the name of list as you like, then click 'Ok' button. Sample Program-4 Let's create a program with the given set of instructions and test output result. Smart Computer Science Book-6 247","Sample Program-5 Let's create a program with the given set of instruction and test output result. 248 More on Scratch Coding","Looping in scratch Looping is the technique to repeat a task for specified number of times or for certain condition. Scratch has the following three types of looping techniques: a. Repeat\t b. Forever\t c. Repeat until This Repeat () block is a Control block, a C block and a Cap Block. Blocks carried inside this block will be repeated for given amount of times. Sample Program-6 Let's create a program with the given set of instructions for the Cat Sprite with given backdrop. Smart Computer Science Book-6 249","Lab Activity-1 1. Modify the above sample program-3 as given in demo. Scan for demo The 'forever block is a Control block, a C block, and a Cap Block. Blocks carried inside this block will be repeated unless the stop sign is clicked, the Stop all block is activated, or the Stop this script block is activated within the loop. Sample Program-7 Let's create a program with the given set of instructions for the Cat Sprite with given backdrop. 250 More on Scratch Coding","Lab Activity-2 1. Modify the above sample program-7 as given in demo. Scan for demo The Repeat Until () block is a Control block, and a C block. Blocks carried inside this block will repeat until the specified boolean statement is true. Sample Program-8 Let's create a program with the given set of instructions for the Cat Sprite with given backdrop. Smart Computer Science Book-6 251","Lab Activity-3 1. Modify the above sample program-8 as given in demo. Scan for demo Conditional and Boolean Conditional statements have conditions and the programs flow based on the true or false value of the condition. They are found in the control programming blocks section. Conditional blocks always work on the basis of boolean value either true or false. The conditional code blocks in scratch are given in picture. A Boolean block is represented by hexagonal block that reports boolean value (value with only true or false). When the block is used, it acts as a reporter block which reports \\\"true\\\" or \\\"false\\\" string values or the numbers \\\"1\\\" and \\\"0\\\" 252 More on Scratch Coding","depending on their usage in a script. The boolean blocks in scratch are: The if () then block is a control block and a C block. If its boolean condition is true, the blocks inside it will run. If the condition is false, the blocks inside the block will be ignored. Sample Program-9 Let's create a program with the given set of instructions for the Sprite cat with given backdrop. Smart Computer Science Book-6 253","Sample Program-10 Let's create a program with the given set of instructions for the Sprite cat with given backdrop. 254 More on Scratch Coding","Lab Activity-4 1. \tWrite a program for the sprite cat, the sprite asks your percentage marks and when you type percentage, sprite says your grade on the basis of following conditions: Percentage\t\t\tGrade >90 and <=100\t\t A + > 80\t\t\t\tA > 70\t\t\t\tB+ >60\t\t\t\tB >50\t\t\t\tC+ >40\t\t\t\tC <=40\t\t\t\tNo grade Scan for demo The if () then, else block is a control block and a C block. (It is also sometimes known as an \\\"E\\\" block.) The block checks its boolean condition; if the condition is true, the code held inside the first C (space) will activate; if the condition is false, the code inside the second C (space) will activate. Sample Program-11 255 Let's create a program with the given set of instructions for the Sprite cat. Smart Computer Science Book-6","Lab Activity-5 1. Create a program for quiz program as given in demo. Scan for demo 256 More on Scratch Coding","The Repeat Until () block is a Control block and a C block. Blocks carried inside this block will repeat until the specified boolean statement is true. This loop is in similar nature to a while loop in some other programming languages. Sample Program-12 Let's create a program with the given set of instructions for the Sprite cat with given backdrop. Lab Activity-6 1. Modify the above sample program-12 as given in demo. Scan for demo Smart Computer Science Book-6 257","The wait until () block is a control block and a stack block. The block pauses its script until the specified Boolean condition is true. Sample Program-13 Let's create a program with the given set of instructions for the given sprite and backdrop. Lab Activity-7 1. Write a program and test as given in demo. Scan for demo 258 More on Scratch Coding","My blocks 'My blocks' is one of the various categories of scratch blocks. It allows us to define a block name and to collect multiple blocks. Now, we can use this defined named block frequently as we like in a new place. So, instead of using same bunch of code blocks again and again, we use this technique which reduces code blocks. It is also called procedure in other programming languages. Creating My Block To create My Block, follow the following steps: Step-1\t:\t Go to the 'My blocks' category and click on it.\t You get the 'My blocks' palate. Step-2 \t: \t Click the 'Create Block' option. You get the following 'Make block' window. Step-3 \t: \t Type the block name and add the inputs like number or text or boolean. Step-4\t:\t Now, you notice that your block is ready to collect codes. Smart Computer Science Book-6 259","Sample Program-14 Let's create a program with the given set of instructions for the given sprites and backdrop. Using 'My Blocks' Advantages of My Blocks \u2022\t Hides Complexity \u2022\t Reduce code size \u2022\t Easier code change \u2022\t Screen refresh can be off so that you can run fast specific code blocks 260 More on Scratch Coding","Without Using 'My Blocks' Smart Computer Science Book-6 261","Lab Activity-8 1. Modify the above sample program-14 as given in demo. Scan for demo Sample Program-15 Let's create a program with the given set of instructions for the given sprite and backdrop. 262 More on Scratch Coding","Lab Activity-9 1. Write codes to test whether you can study scratch or not. If marks is above 50, you can study otherwise you can not study.Use My blocks technique. Scan for demo Pen extension The pen is a feature in Scratch that allows a sprite to draw shapes, plot colored pixels, and many more on the screen with the pen blocks. The pen extension is derived from Logo's turtle. To use the Pen blocks in Scratch, you need add the Pen extension. To add the pen extension, follow the following steps. Step-1\t: \tClick on the Add extension button in the bottom left-hand corner. Smart Computer Science Book-6 263","Step-2 \t: \t Click on the Pen extension to add it. Step-3 \t: \t The Pen section appears at the bottom of the blocks menu. The following code blocks are available in 'Pen' palate Clears all pen marks on the screen Draws a copy of the Sprite on the Stage Turns the pen feature on inside a sprite; the sprite will leave pen marks on the screen wherever it moves until the pen is turned off Turns the pen feature off, stopping a sprite from penning Sets the size of the pen to a chosen number Sets the color of the pen to a predetermined color Changes a property of the pen by a given input Sets a property of the pen to a given input Changes the size of the pen by a chosen number 264 More on Scratch Coding","Sample Program-16 Let's create a program with the given set of instructions for the given sprite. Sample Program-17 Let's create a program with the given set of instructions for the given sprite. Smart Computer Science Book-6 265","Sample Program-18 Let's create a program with the given set of instructions for the given. Sample Program-19 Let's create a program with the given set of instructions for the given sprite. 266 More on Scratch Coding","Lab Activity-10 1. Write codes to display the following rectangle. Scan for demo Sample Program-20 Let's create a program with the given set of instructions for the given sprite. Smart Computer Science Book-6 267","Sample Program-21 Let's create a program with the given set of instructions for the given sprite. Lab Activity-11 1. Write codes to display the following pentagon. Scan for demo 268 More on Scratch Coding","Points to Know \u2022\t Scratch is a block based visual programming language that allows us to create their own interactive stories, games and animations. \u2022\t Variable is a name of storage location which holds changeable value in memory. \u2022\t There are three types of variables: i) Global variable ii) Local variable and iii) Cloud variable. \u2022\t The Ask () and Wait block is a Stack\/Cap block. It is available under a Sensing category block. \u2022\t In scratch, mathematical operators blocks are used to perform the mathematical operation. \u2022\t In scratch, string operators blocks are used to perform the string operation. \u2022\t A list is a tool that can be used to store multiple pieces of information at once. \u2022\t Scratch has the following three types of looping techniques: \t a. Repeat\t b. Forever\t c. Repeat until \u2022\t Conditional statements have conditions and the programs flow based on the true or false value of the condition. \u2022\t A Boolean block is represented by hexagonal block that reports boolean value (value with only true or false). \u2022\t My block' allows us to define a block name and to collect multiple blocks. \u2022\t The pen is a feature in Scratch that allows a sprite to draw shapes, plot colored pixels, and many more on the screen with the pen blocks. Terms to Know Scratch\t : \t Name of programming language Sprite\t: \t An object in Scratch that performs functions controlled by scripts Stage\t: \t The background of your project where sprite takes action Cloud\t: \t Storage location on remote computer through the internet Array\t :\t An array is a collection of similar data elements stored at contiguous memory locations Loop\t:\tA sequence of instructions that is continually repeated until a certain condition is over. Boolean\t:\t A form of data with only two possible values true or false Smart Computer Science Book-6 269","Worksheet Objective Questions 1. Fill in the blanks: a. \tScratch is a ........................ based visual programming languages. b. \tScratch was created by the Life Kindergarten group at ................... Media Lab. c. \t.............................. is a name of storage location which holds changeable value in memory. d. \tVariables are created with the 'Make a variable' button in the ...................... palette. e. \tThe default value of variable is ...................... f.\t ......................... variables can be read and changed by any sprite, or stage. g. A boolean block is represented by .............................. block i. ....................... Allows us to define a block name and collect multiple blocks. 2. State whether the following statements are true or false: a. \tScratch builds logic and analytical skill with fun. b. \tOnce scratch is downloaded and installed to a computer then we need Internet access to create a project. c. \tScratch is a free to download software. d. \tVariable can hold multiple values at a time. e. \tScratch does not allow variables to be created by a script as it runs. f. \tAll the variables are created in RAM. g. \tThe 'Answer' block automatically updates to most recent input. h. \tConditional blocks work on the basis of boolean value true or false . i. \t Blocks defined by 'My Blocks' can be used again and again as we like j.\t Pen extension is derived from Logo's Turtle. 270 More on Scratch Coding","3. Select the correct option: a. Private variable is i) Global variable\t\t ii) local variable\t\t iii) Both of them b. To make input through the keyboard, we use the block i) Ask () \t\t\t ii) wait\t\t\t\t iii) Ask () and wait c) \tThe keyboard input is stored in the block: i) Answer \t\t\tii) wait\t\t\t\tiii) Ask() d) Types of loop \t i) Repeat () \t\t ii) Forever\t\t\t \t iii) Repeat until () \t\t iv) All of them e) The 'forever' block is called: \t i) Control block \t\t ii) 'C' block\t\t \t iii) Cap block\t \t iii) All of them f) \tBoolean value ii) False\t\t\t iii) True or False \t i) True\t\t\t g) \tif () then block is a ii) Control block\t \t i) Cap block\t\t iv) Both ii) and iii) \t iii) 'C' block \t\t h)\tScratch is a ii) Word processing \t\t \t i) Programming language\t\t iv) None of these \t iii) Painting and drawing\t\t i) \tCloud variables are stored on: Your computer \t i) Cloud server. \t\t\t iv) None of these \t iii) On your mobile phone\t\t j. The if () then, else block is a ii) 'C' block \t i) control block \t\t\t iv) All of these \t iii \\\"E\\\" block.) \t\t\t Smart Computer Science Book-6 271","3. Match the following with suitable pair: a. Repeater Block g. Cap Block c. Stack Block d. Boolean Block e. Event Block f. E Block b. To return remainder Descriptive Questions 1. Answer the following questions: a.\t What can yo do in Scratch? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... b. \tHow does variable reports the value on the stage? Ans: ............................................................................................................................ .................................................................................................................................... 272 More on Scratch Coding","..................................................................................................................................... c.\t What is variable? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... d. \tDifferentiate between global and local variable. Ans: ............................................................................................................................ ..................................................................................................................................... ..................................................................................................................................... .................................................................................................................................... .................................................................................................................................... e. \tWhat is cloud variable? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... f. \t What do you mean by mathematical operator block? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... g. \tWhy do you use string operator block? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... h.\t Why do you use List? Ans: ............................................................................................................................ Smart Computer Science Book-6 273","..................................................................................................................................... .................................................................................................................................... i.\t What is looping? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... j. \t Why do you use 'forever' block? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... k. \t Why do you use 'My Block'? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... l. \t List out the advantages of 'My Blocks' Ans: ............................................................................................................................ ..................................................................................................................................... ..................................................................................................................................... ..................................................................................................................................... m. \tWhat is 'Pen' extension in Scratch? Ans: ............................................................................................................................ ..................................................................................................................................... ..................................................................................................................................... .................................................................................................................................... 274 More on Scratch Coding","Case study and Application-based questions 1. \tStudy the following given image and answer the asked questions: a. When do you activate this dialog box? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... b. In which case do you select 'For all sprites' and 'For this sprite only' option? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... c. How do you activate this dialog box? Ans: ............................................................................................................................ ..................................................................................................................................... .................................................................................................................................... 2. \tSaru Burlakoti wants to store 20 students name. She is thinking to create 20 dif- ferent types of variable. Sarmila Achhame, wants to store marks of eight subjects. He is also thinking to create separate variable for each subject name and marks. Now, according to you, are they taking right decision? Mention your view. Ans: ............................................................................................................................ Smart Computer Science Book-6 275","..................................................................................................................................... ..................................................................................................................................... ..................................................................................................................................... ..................................................................................................................................... 3. \tSudhir Lamichhane and Kunti Das have to write codes in scratch as their teacher assigned practical work. Sudhir has to take the decision out of two options either this or that. But Kunti has to take a decision out of more than 2 situations. Now, mention your suggestion, which code block is suitable for them to perform their task according to your logic? Ans: ............................................................................................................................ ..................................................................................................................................... ..................................................................................................................................... ..................................................................................................................................... ..................................................................................................................................... 4. \tWhile programming in Scratch, Shanta and Rima got the following situation to repeat a task: Now, which code block should they use for each situation? i) Until they meet a specific situation. Ans: ............................................................................................................................ ii) For specific number of times. Ans: ............................................................................................................................ iii) Until they stop their program themselves. Ans: ............................................................................................................................ 276 More on Scratch Coding","5. \tKabindra has to halt the program execution, when he won't get a specific situation. Which code block he should use for this case? Ans: ............................................................................................................................ 6. \tSumi Tharu has to snap the following codes in many places which becomes very long code blocks and creates confusion. Is there any option to reduce and simplify the code? Ans: .............................................................................. ....................................................................................... 7. \tStudy the following pair of code blocks and find the difference between their output logically. Ans: ............................................................................................................................ ..................................................................................................................................... ..................................................................................................................................... Smart Computer Science Book-6 277","Lab Project-1 1. Study the following set of code blocks and type the codes then test your result. \u2022\t Write a quiz program using your own idea with the help of this example. 278 More on Scratch Coding","Lab Project-2 a) \tWrite a program after viewing the demo for the same as you seen in the demo. Scan for demo b)\t Write a program after viewing the demo for the same as you seen in the demo. Scan for demo c) \tModify the above 279 number 2.b) as you see in the demo. Scan for demo Smart Computer Science Book-6","Lab Project-3 a) \tModify the above number 2.c) as you seen in demo'. Scan for demo b. \tStudy the following set of code blocks and type the codes then test your result. Code for the backdrop Code for the sprite earth 280 More on Scratch Coding","Lab Project-4 a) \tModify the above number 3.b) as you seen in the demo. Here, we have to show that sun also revolves in own axis. Scan for demo b. \tModify the above number 4.a) as you seen in demo. Here, we have to show that sun also revolves in own axis. Scan for demo Smart Computer Science Book-6 281","Lab Project-6 1. \tArrange the following set of code blocks in the computer and run the program. Analyze and imagine about the differences between the SET and CHANGE blocks. 282 More on Scratch Coding","Model Question (Theory) Class :VI Computer Science Time 1 hr. 30 Minutes\t\t\t\t\t\t F.M. 50 Group 'A' (15 Marks) Objective knowledge-based Questions 1. \tWrite the correct word in the blank spaces:\t\t\t (5 x 0.5= 2.5) a.\t A computer is a smart .......................... device. b.\t The common layout of keyboard is ............................... c. \t CD is an ................................. disk. d. \t.......................... brings life to the computer. e. \t.......................... is a long horizontal bar located at the bottom of the desktop. 2. \tWrite 'T' for true and 'F' for false statement: \t\t (5 x 0.5= 2.5) a.\t Computers have own feelings and emotions. b. \t Dotmatrix printer is an impact printer. c.\t\tROM is a read and write memory. d. \t Android is an operating system software. e. \t Workbook comes inside a worksheet. 3. Write the Full Forms. \t\t\t\t\t\t(5 x 0.5= 2.5) a. GIGO\t\t b. LCD\t c. USB\t d.URL\t e. GUI 4. Match the following: \t\t\t\t\t\t (5 x 0.5= 2.5) a. \tProduce information and result\t\t a. Output device b. \tSoft copy output\t\t\t\t b. Sound c. \t Volatile memory\t \t\t\t c. RAM d.\t System software\t\t\t\t d. Cyber law e.\t Rules regarding cyber space\t\t\t e. Compiler Smart Computer Science Book-6 283","5. Write the technical terms for the following : \t\t\t (5 x 0.5= 2.5) a.\t Calculation and comparison of data to get final result. b. \tReal time audio video communication with each other. c. \tThe circular disk on which magnetic data is stored. d. Computer program designed to destroy the computer. e. \tLoading the operating system in the computer. 6. \tMark the correct answer:\t\t\t\t\t(5 x 0.5= 2.5) a. \tSpreadsheet software: i) \t Windows\t ii) Excel\t iii) MS-Word\t\t\t iv) All of these b. \tPrimary memory: i. RAM\t\t ii) ROM\t iii)Both i) and ii)\t\t iv) None of these iv) None of them c. Private variable is known as : i) Global variable\t ii) local variable\t iii) Both i) and ii)\t d) Types of loop in Scratch: i) Repeat () \t ii) Forever\t\t iii) Repeat until () \t iv) All of them e. Hardcopy output device: i) Monitor\t\t ii) Printer\t\t iii) Speaker\t\t iv) All of these Group 'B' (10 Marks) (5 x 2 =10) Descriptive Questions 7. Answer the following questions: \t\t\t\t a. \tWhy is computer called diligent machine? b. \tWhat does logical operation involved in? c.\t What is the function of cache memory? d. \tWhy is software called soul of the computer? e.\t What is ICT? 284 Model Question (Theory)","Group 'C' (10 Marks) (2x5=10) Case Study and Application-based Questions 8. Study the following cases and answer the asked questions \t\t a. Ritesh Chaudhary is the owner of a video recording and distribution company. He has to sell music videos in the market; which storage device is more reliable for Ritesh to distribute the music videos? b. Mandakini is feeling that her computer is getting slower and performance is being poor day to day. In this case how would she solve this problem? c. \tSatyam has celebrated his 12th birthday. He is interested to send some video clips and photos of his birthday celebration instantly to his relatives who stay in the USA and London. What would he do for this case? Mention your logic. d. \tKapildeb Bhatta is going to establish a school. He is wiling to furnish his school with multimedia technology. What should he do in this case? e. \tManik Lal Yadav is a computer operator. When he booted his computer, he found a lot of files, folder, icons were scattered. It looked very untidy, and difficult to find the required matter. Now, to mange his desktop what could Manik Lal do? Group 'D' (15 Marks) (3x5=15) Program logic based Questions 9. What can be the output of given code blocks: \t\t\t a. Smart Computer Science Book-6 285","b. Code for the sprite Code for the backdrop c. 286 Model Question (Theory)","Class :VI Model Question (Practical) Time 1 hr. 30 Minutes\t\t\t\t\t\t\t Full Marks: 50 1.\t Prepare the following document in MS-Word as the given format: \t\t (5) Four Candidates file nomination for Vice President From left, Ram Sahay Prasad Yadav, Pramila Yadav, Mamata Jha and Astalaxmi Shakya Post Photo Ram Sahay Prasad Yadav and Pramila pm Saturday. Yadav from the Janata Samajbadi Party and Mamata Jha of Janamat Party A total of three candidates filed their registered their nomination from the ruling candidacies from the ruling coalition after alliance while CPN-UML fielded party the alliance partners failed to agree on a vice-chair Astalaxmi Shakya. common candidate for the post. A total of four candidates registered their From the ruling alliance, Ram Sahay nominations for the vice-presidential Prasad Yadav and Pramila Yadav from the election at the Office of the Election Officer Janata Samajbadi Party and Mamata Jha at New Baneshwar on Saturday as the of the Janamat Party filed their candidacies deadline to file candidacy ended at 2 pm. for the post of Vice President. The Election Commission, which has https:\/\/kathmandupost.com\/national\/2023\/03\/11\/four- scheduled the election of Vice President candidates-file-nomination-for-vice-president for March 17, had asked the aspirants to register their candidacies from 9 am to 2 Smart Computer Science Book-6 287","2. \tPrepare the following Worksheet and perform the given task : (5) a.\t Calculate Gross Total (Quantity \u00d7Rate) b.\t Find the discount 10 % of Gross total c.\t Find the Net total (Gross Total-Discount) d.\t Find the Net Total Amount. Or Prepare a presentation including 3 slides on the topic 'Input and output devices'. 4. \tArrange the Scratch code blocks to move the character 10 steps up, down, left or right while pressing the respective key from the keyboard'. \t\t (5) 5. \tArrange the Scratch code blocks for the following: \t\t\t(5) 6. Write the scratch code blocks to play quiz. Sprite should ask five questions one by one and response your answer whether correct or wrong respectively.\t (5) [ 25 marks for internal assessment and activity ] 288 Model Question (Practical)","Smart Computer Science Book-6 289"]


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook