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 IT Spark Class- 6 Flipbook

IT Spark Class- 6 Flipbook

Published by Flip Book, 2021-01-18 08:25:00

Description: IT Spark Class- 6 Windows-7, Office-2013

Keywords: Computer Book,eBook

Search

Read the Text Version

6 For Age Group 10 to 12 years COMPUTER BOOK Computer Education Series Concept by: Composed by: Contributed by: Gagan Agarwal David S. Gareema Balwani Hitesh Saini Founder M.D. CLDP, MCA,15 yrs exp. with NIIT Jameel Khan

Contents 1. Algorithm and Flowchart 4 6. MS Excel: Formatting, 62  Algorithm 14 Formulas and Functions  Flowcharts 25 39  Format Cells dialog box 2. Computer Languages & Programming Techniques 55  Excel Formulas & Functions  Categories of 7. MS Excel: Programming Language Working with Data 79  Pseudocode  Cell References, Data Sorting, 3. MS PowerPoint: Animation and Transition Filtering & Conditional Formatting  Animation and its types  Subtotal, Pivot Table  Slide Transitions 8. MS Excel: Presenting 93 4. Game Creation in Scratch Data in Charts 106  Scratch Basics  Scratch Libraries  Types of Chart  Event Handling & User Input  Working with Charts, Goal Seek  Sounds  Making a Game Supplement Google Sheets 5. MS Word: Mail Merge  Introduction to Mail Merge 9. Communication using Internet 108  Creating mail documents  Communication Tools with Mail Merge  Email & Chatting  Gmail, Gmail on Android, WhatsApp Project 120 PowerPoint: Mission Chandrayaan-2 Scratch: Ghost Hunter Excel: Book Shop

SAFE COMPAUNTDINHGAPPINESS INTERNET USAGE DONT’S 1. Don't give anyone your password & other details as well as any information about your family. 2. Don't talk to strangers on the Internet. 3. Don't agree to meet any of your online friends in person. 4. Don't fill in any form online that asks for details like address or phone number. 5. Don't visit any online chat room without elder’s or parent's permission. 6. Don't watch online any stuff that you think your parents won't like. 7. Don't post family and personal pictures without your parents' knowledge. 8. Don't download/install anything on your PC without your parents' permission. 9. If you have any doubts, ask your parents, teachers or elders. 10. If anyone cyberbullies, get in touch with your teachers and parents. CYBERBULLYING Cyberbullying is bullying that takes place over digital devices like cell phones, computers, and tablets. Cyberbullying includes sending, posting, or sharing negative, harmful, false, or mean content about someone else. How to keep safe?  Don't respond to any emails or messages sent by anyone who cyberbullies you.  Don't cyberbully others online. Respect everyone’s privacy and rights.  Save the messages and screen-shots of the messages as an evidence of cyberbullying.  If you are being bullied, inform your elders immediately.

1 Algorithm and Flowchart Dear teacher, Dear students, What do the In this chapter we shall terms Algorithm learn about algorithms and flowcharts. and Flowchart mean? What is their significance in programming? Computer solves the problems by following the instructions given to it. Every time we need the same task to be done by the computer, we have to feed it the same instructions again. To avoid this, we can save those instructions in the computer. Such set of instructions is called program. The programs are written using various programming language such as C, C++, Java, Python, VB, C# etc. Amazing Fact You can add 2 + 2 quickly and give the answer 4, but a computer can give the answer only if it has proper instructions to add the numbers i.e, how to add the numbers. And the instructions should be in a computer language. Algorithm The logical sequence of steps for a program is called algorithm. It is written in simple English. Algorithm helps in understanding the flow of the intended program easily. Another advantage of algorithm is to use it to develop its graphical form called Flowchart. Advantages of Algorithm  It is the set of steps arranged in a logical sequence as a solution to a given problem.  It makes it easier to create the graphical representation of the program flow called flowchart.  It is in human language (English in our case) hence easy to understand.  It is easy to find logical errors since every step has its own logical sequence. 4

Example 1: To calculate the sum of three numbers. 1. Start. 2. Input three numbers; x, y and z. 3. Calculate the sum of three numbers (x + y + z). 4. Print the sum. 5. Stop. Example 2: To find the greater of two numbers. 1. Start. 2. Input two numbers, X and Y. 3. Compare X and Y. If both are equal, go to step 5, else go to step 4. 4. Compare if X is greater, go to step 6, else go to step 7. 5. Print “Both are equal” and go to step 8. 6. Print “X is greater” and go to step 8. 7. Print “Y is greater” and go to step 8. 8. Stop. Do it Yourself Amazing Fact Write an algorithm to find the A flow chart generally flows in the direction greater of three numbers. from top to bottom or left to right. Flowchart A flowchart is a graphical representation of steps of an algorithm. It is a set of different types of boxes and symbols that are connected with arrows/flow lines. Some common blocks and symbols used to create a flowchart are given here. Start/Stop Box An oval represents the start or end point. Input/Output Box A parallelogram represents input or output. Process Box A rectangle represents a process. 5

Flow lines The flow lines determine the flow through Decision Box the chart i.e, they show the direction in which the program moves. A decision/diamond box checks any condition in the program. Connector It connects one part of flow chart to another. Do it Yourself Identify the various parts of the given flowchart. Advantages of flowchart 1. Flowcharts are an easier way to depict the logic of the program. 2. Flowcharts, being graphical, help greatly in problem analysis. 3. Flowcharts of any program are good for documentation and later reference. 4. A flowchart helps in debugging process (to remove errors). Limitations of flowchart 1. For complex, large programs flowchart becomes complex and difficult to follow. 2. If alterations are required the flowchart may require re-drawing completely. Drawing Flowcharts using Dia Dia is an easy-to-use, free Flowchart designer. Dia comes as an .exe file so to ensure its clean and latest version, it is recommended to download it directly from http://dia- installer.de/. After downloading the .exe file, double click on it to launch it and follow the simple instructions on the installer screen to install it. 6

Dia Interface Menu bar: A standard menu bar with various menus. Standard toolbar: It provides quick tools like new, open, save, print and export diagram etc. Diagram Canvas: It is the largest blank area where you can draw the desired diagrams. Toolbox: All the blocks and connecters you need are available in the Toolbox. It also provides options for line widths and arrow styles. Drawing Flowcharts in Dia Click on the desired block in the Toolbox and drag with mouse on the Canvas. The block will be drawn. Editing Tools 1. Use Arrow tool to move the shape around on the canvas. 2. Use Text edit tool to type text inside the block or press F2 key on the keyboard. 3. Use Connecters to connect the blocks with lines and arrows. 4. Use Line widths to set the line thickness. 5. Use Arrow styles to set desired arrow style. 6. For font, lines and colour settings, double click on the desired block to edit its properties. You can use File menu > Export option to export your chart as an image. 7

4 1 5 2 3 6 Line width and Arrow Styles Converting an Algorithm into a Flowchart Flowcharts are usually drawn from top to bottom. To convert an algorithm into a flow chart, pick up each statement in the algorithm and find the suitable, matching block of flowchart. Then connect them from top to bottom or left to right as the space on the paper allows. Let us see some examples now. 8

Example 1: To calculate the sum of three numbers. Flowchart Algorithm 1. Start. 2. Input three numbers; x, y and z. 3. Calculate the sum of three numbers; Sum= x + y + z. 4. Print the sum. 5. Stop. Example 2: To find the area of a rectangle. Flowchart Algorithm 1. Start. 2. Input the length and breadth of the rectangle; L, B. 3. Calculate the area; Area=L x B. 4. Print the Area. 5. Stop. Do it Yourself 1. Write an algorithm to find the average of five numbers and draw the flowchart also. 2. Write an algorithm to find the perimeter of a rectangle and draw the flowchart also. 3. Draw the Flowchart on paper for the following algorithm: 1. Start. 2. Input the radius of circle; R. 3. Calculate the area; Area=π R x R. 4. Print the Area. 5. Stop. 9

Example 3: To convert an algorithm into a flowchart to find the greater of two numbers. 1. Start. Algorithm Flowchart 2. Input two numbers, X and Y. 3. Compare X and Y. If both are equal, go to step 5, else go to step 4. 4. Compare if X is greater, go to step 6, else go to step 7. 5. Print “Both are equal” and go to step 8. 6. Print “X is greater” and go to step 8. 7. Print “Y is greater” and go to step 8. 8. Stop. Do it Yourself Write an algorithm to convert feet into inches. Draw the flowchart also. Loop A loop has a purpose to repeat one or more statements a certain number of times or until a condition is fulfilled. While using a loop, you need a counter. A counter is a variable that is used to count the number of times a procedure is being repeated. Its name could be anything like x, counter, ctr etc. A variable is the name of data. It keeps on changing its value during execution of a program. Its value can be incremented or decremented as per your requirement. Example 1: To print the name 10 times. 10

Example 2: To enter any number and print its table. Glossary Algorithm : An algorithm is a sequence of steps to solve a problem. Flowchart : A flowchart is a graphical representation of steps of an algorithm. Quick Review  A set of instructions, written in a computer language, is called a program.  Different types of boxes and symbols are used in a flowchart.  A loop has a purpose to repeat a statement a certain number of times or until a condition is fulfilled. A. Choose the correct answer. 1. A/ An ________ is used to solve a specific problem.. a) Algorithm b) Program c) Both a) and b) d) None of these 11

2. A flowchart symbol cannot be typed. This is a __________ of flowcharts. a) feature b) limitation c) Both a) and b) d) None of these 3. A _________ is used to repeat one or more statements a certain number of times. a) Loop b) Algorithm c) Flowchart d) Program 4. A ________ may have its value changed during program execution. a) Flowchart b) Algorithm c) Counter d) None of them B. Answer the following questions. 1. What do you mean by the terms: Program, Algorithm and Flowchart? ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ 2. What is the advantage of a flowchart? ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ 2. List advantages of algorithm. ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ ___________________________________________________________________ 12

C. Match the following. Column-II Column-I a. b. 1. Flow lines c. 2. Process box d. 3. Decision box e. 4. Input/output box 5. Start/stop box Create algorithms to solve the following problems and then create Flowcharts using Dia or PowerPoint shapes or OpenOffice Draw or any other software provided in lab. 1. Accept the age of the user and check, if user is eligible to cast vote (age 18 or above). If not then display the number of years user should wait to be eligible for voting. If yes then display the message “You can vote.” 2. Accept numbers from the user and keep them adding until user inputs zero. When a zero is input, program should display the sum of all the numbers entered and end. 3. Modify the algorithm and flowchart of Problem #2 to not to add any negative numbers input by the user. 4. A laser printer is printing one page at a time. Computer should display the message “Paper out!” if paper runs out in the printer and program should end. This should be checked before printing every page until all the pages are printed. Teacher's Signature : __________________ Teacher's Remark : WEB https://en.wikiversity.org/wiki/Programming_Logic LINKS https://kids.kiddle.co/Flow_chart Teacher’s Corner Teachers are advised to cite real life examples around students’ daily life to explain the concepts in an easier fashion. 13

2 Computer Languages & Programming Techniques Dear Teacher, Dear Students, How can we talk to A computer language is a computer? nothing but a language What is a computer which a computer can understand. We will learn language? about them in detail. We all know that a language is a medium to express our views and ideas. It is essential for all those who have the capacity to understand. Computer can also understand things so it also requires languages through which one can interact with it. Computer language is nothing, but a language which a computer can understand. A computer language is the mean by which Amazing Fact instructions and data are transmitted to the computer. In other words, computer Lady Ada Lovelace was the languages are the interface between a first computer programmer computer and its user. in the world. Categories of Computer Languages The computer languages can be classified into four categories :  First Generation Language (Machine Language)  Second Generation Language (Assembly Language)  Third Generation Language (High Level Languages)  Fourth Generation Language (Modern Languages) First Generation Language (Machine Language) It is the only language that a computer can understand. It is expressed in binary form i.e. ‘0’ and ‘1’. Machine language has the advantage of very high speed and very low memory utilization. But understanding and learning machine language is a tough and tiresome process. 14

This language is extremely machine-dependent. A machine language program written on one computer may or may not run on another computer. Because of this, very few people opt for specialization in machine language. This is the reason why machine language is also regarded as Low Level Language (LLL). Second Generation Language (Assembly Language) It enables a programmer to use names instead of numbers. This language uses mnemonic codes or symbols in places of 0’s and 1’s. Instead of remembering the exact memory locations where data and instructions are stored, symbolic memory addresses are used for data. Since the computer can only understand the machine language, assembly language programs have to be converted into machine language. Translator programs known as Assemblers were developed to convert the assembly language program into machine language. A program written in assembly language is called the Source program and the program converted into machine language by assembler is called Object Program or Object Code. Third Generation Languages (High Level Languages) A High Level Language can be understood by humans easily as compared to the previous two languages. The restrictions in the usage of Machine and Assembly languages prompted people to develop a language with the following features: Simple and user friendly language. Language which is machine independent. Owing to the above features, it became easier to learn and use the computer languages. A large number of people started writing computer programs using these languages. That is why they are known as High Level Languages (HLL). Basic, C, C++, Java etc. are some of the very popular high level languages. Fourth Generation Language (Modern Languages) Often abbreviated 4GL, fourth-generation languages are programming languages closer to human languages than typical high-level programming languages. Most 4GLs are used to access databases. For example, a typical 4GL command is: FIND ALL RECORDS FROM EMPLOYEE WHERE NAME IS \"SMITH\" Fourth Generation Languages are a combination of languages and following features:  They are highly user-friendly.  They are executed at very high speed. Do You Know ?  They reduce level of programming skills. FORTRAN was the first modern programming language.  They require minimum efforts from the user to obtain any information. 15

 In 4GL, the user has to just specify the required output Do it Yourself and the format of the output without bothering about the steps required to obtain that. Search about some more information on computer Examples of fourth generation languages are Clipper, SQL, languages on Internet. Panther, etc. Let's have a brief look on the features of the languages discussed above: Machine Language Assembly Language  Binary codes to depict operators and  Mnemonics or symbolic codes used data. instead of binary numbers.  Machine dependent.  Machine dependent.  Only language which is directly  Has to be converted into machine understood by computer. language by translator programs (Assembler). High Level Language  English words and mathematical Modern Language  Machine independent. operators are used.  Minimal user skills required to obtain  Machine independent.  Has to be converted into Machine results.  Application development tool. language by translator programs. Some Translator Programs As we know that computer can understand only machine language, so when we type programs in the languages other than machine language then we need a translator program to convert the program code into machine code. Some of these translator programs are discussed as follows. 1. Assembler An Assembler is a computer program which converts assembly language program into machine language. 2. Compiler It is a translator program to convert a high level language program into machine language. It translates the whole program at once and generates a list of errors, if any otherwise it generates the object code for the program. The execution is very fast. 3. Interpreter It translates a high level language program into machine language line by line i.e. it 16

converts one line, executes the instruction and then repeats the procedure for the remaining instructions. Program stops when an error is encountered. Interpreter programs are preferred for beginners and are slow in execution. What is a program? A program is a set of instructions arranged in a logical sequence which tells the computer what to do. Note Different Programing Concepts Modular Programming In Modular programming we divide a large program into small units called modules. This programming consists of one main module and more sub modules. Each module originates from a source code. Eg - ‘C’ Programming. Procedural Programming Procedural programming is used to tell the computer exactly what to do - step by step. Procedural Programming refers to functions and the execution of the functions. It emphasizes more on procedure than data. Eg- Assembler, FORTRAN, COBOL, C, etc. Event-Driven Programming Event-driven programming or event-based programming is a kind of programming in which the flow of the program is determined by events-i.e. on user actions (mouse clicks, key presses). Eg- Visual Basic. Object Oriented Programming (OOP) In Object Oriented Programming, a program is a collection of objects. These objects contain both data and functions. Objects belong to classes, and can perform specific tasks. Eg - C++, Java, C#, etc. The following steps are required for the planning of a program:  Defining and analyzing the problem: Before writing a program, you need to define exactly what kind of data you need to provide to the system and what kind of information (as output) you want from the program.  Developing the solution logically using an algorithm. For example Amazing Fact Suppose you want to write a program to find Event is happening. When a user the total and average of a student’s marks in does some activity on the five subjects. computer then that is called an event. Mouse Click, Double As input, you need to mention the marks in the Click, Key Press, etc. are some of five subjects. the examples of events. As output, the marks in the five subjects, their total and average should be displayed. 17

Do You Know ? What is programming? The process of writing the instructions in a computer language is called programming. Let us learn about various technical terms (components of a program) that you should know before writing a program. 1. Command (Keywords): These are the words that tell the computer what to do. These are also called ‘reserve words’. Some examples of commands are BEGIN, END, IF, ELSE, TRUE, FALSE, DO, WHILE, THEN, SET, RESET, CHAR, BOOLEAN, INTEGER, etc. 2. Data: It is divided into three parts: a. Numbers (0 - 9) b. Alphabets (A- Z, a - z) c. Special symbols (such as +, -, >, <, =, etc.). There are two types of data: constant and variable. 3. Data Type: A data type in a programing language is a set of data with values having predefined characteristics. For example, Integer, Float (decimal numbers), Character and String. Usually, a set of such data types come built in a language. The language usually specifies the range of values for a given data type, how the values are processed by the computer and how they are stored. 4. Variable: A variable is a named storage location which is used to store the values. Its value can be changed throughout the program. Various types of data can be stored in variable i.e. numeric, character and string. • Numeric: Numeric data comprises only numbers. For example, 5, 124, 123.44. • Character: A character can be a number, an alphabet or a symbol. It is alsoknown as alphanumeric data type. For example, a, D, %, 3. • String: A string can contain numbers, alphabets and symbols. It is also a alphanumeric data type. A string value should be enclosed in double quotes. For example, “Manish”, “51 GTB Nagar”. a. A variable can be made up of multiple characters, numbers and ‘_’ symbol. b. Name of a variable must start with a letter. c. Reserved words cannot be used with a variable name. Following are the examples of valid and invalid variable names: Valid variable names: X, years, weeks_in_a_year, My_program, Num1. Invalid variable names: 1year, Annual%rate, Miles-per-hour. 18

Let us see some examples of variable declaration. integer x //declares an integer type variable which holds integer values float num1 //declares a float type variable which holds decimal values char ch //declares a character type variable which holds characters 5. Constants: Constants are the types of data that do not change throughout the program. However, like a variable, a constant data can be numeric, character or string. 6. Comments: Comments allow you to put remarks and notes to yourself inside the program’s source code. They don't affect the way your program executes. Put ‘//’ double slashes) before a sentence/statement to make it ‘comment’. See the examples of variable declaration in Variables section for comments. 7. Operators: An operator is a program element that is applied to one or more operands in an expression or statement. In other words, an operator is a special symbol that is used to calculate or perform operations on variables. Operators can be classified into four categories: a. Assignment Operator: An assignment operator is used to assign a value to a variable. For example, a = 5. This statement assigns an integer value i.e. 5 to the variable ‘a’. b. Arithmetic Operator: An arithmetic operator is used to do basic mathematical operation. Following are the examples of some arithmetic operators. Operators Operation Example expression + Addition Sum = x + y – Subtraction Diff = x - y Multiplication Pro = x * y * Quo = x / y / Division c. Relational Operator: A relational operator is used to compare the values of two variables. It can be used to compare constant values also. It gives the result in true or false. Following are the examples of relational operators. Operators Operation Example expression < Less than If(age<18)//Is age less than 18? > Greater than If(age>18)//Is age greater than 18? <= Less than or equal to If(age<=18)//Is age less than or equal to 18? >= Greater than or equal to If(age>=18)//Is age greater than or equal to 18? == Equal to If(age==18)//Is age equal to 18? != Not equal to If(age!=18)//Is age not equal to 18? 19

For example, (7 == 5) //evaluates to false (5 > 4) //evaluates to true (3 != 5) //evaluates to true (7 >= 2) //evaluates to true (5 < 5) //evaluates to false d. Logical Operator: A logical operator is mainly used to control program flow. Usually, you will find it as part of a control statement . There are three logical operators used in programming: AND, OR and NOT. The logical operators for AND(&&) and OR(||) are used to combine simple relational statements into more complex expressions. The NOT(!) operator is used to negate a boolean statement. The relational operators are used to combine and evaluate the compound conditions, which means that whenever it is required to evaluate more than one condition at a time, a logical operator is used. i) AND (&&): It corresponds with X Y X AND Y Boolean logical operation AND. This operator results true if both of TRUE TRUE TRUE its operands are true, and false TRUE FALSE FALSE otherwise. FALSE TRUE FALSE FALSE FALSE FALSE For example, ((5 == 5) AND (3 > 6)) //evaluates to false (true AND false) ((5 > 4) AND (3 != 5)) //evaluates to true (true AND true) Amazing Fact The word Boolean is used for logical results. Boolean is also a branch of Mathematics and when you learn about programming, it is a data type also. ii) OR (||): It corresponds with Boolean logical operation OR. This operator results true if either of its operand is true, and false when both the operands are false. X Y XY TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE 20

For example, ((5 == 5) AND (3 > 6)) //evaluates to true (true AND false) ((5 > 4) AND (3 != 5)) //evaluates to true (true AND true) iii) NOT (!): It returns the opposite Boolean Y NOT X value of it’s evaluating operand. TRUE FALSE FALSE TRUE For example, NOT(7==5) //evaluates to true because (7==5) would be false NOT(5 > 4) //evaluates to false because (5 > 4)would be true NOT True //evaluates to false NOT False //evaluates to true Pseudocode Pseudocode is an artificial code to understand program flow. It is just a practice before producing the final code of any programming language. Pseudocode is not an actual programming language. It is not compatible with any programming language so it cannot execute on computer system. There are some rules to be followed before writing a pseudocode. These are: 1. It should be initialized with Begin keyword and end with End keyword. 2. Use Accept keyword for input and Display keyword for output. 3. Use ‘//’ to write comments. Let’s see some examples of creating a pseudocode. Note 1. Pseudocode to find the sum of two numbers. Pseudocode is an artificial Begin and informal language that Accept x, y helps programmers to Sum = x + y develop algorithms. Display Sum You will learn about End algorithms in next chapter. 2. Pseudocode to find the area of a square. Begin Accept s Area = s x s Display Area End 21

Glossary : It is a language which a computer can understand. : Low Level Language Computer Language : High Level Language LLL : It is a set of instructions which tells the computer what to do. HLL : Object Oriented Programming Program : It is a named storage location which is used to store the values. OOP : Pseudocode is an artificial code to understand program flow. Variable Pseudocode Quick Review  Machine language is expressed in binary form i.e.‘0’ and ‘1’.  Assembly language uses ‘mnemonic codes’ or ‘symbols’ in places of ‘0’s and ‘1’s.  Fourth-generation languages are programming languages closer to human languages.  An Assembler converts assembly language program into machine language.  Compiler and Interpreter convert a high level language program into machine language.  The process of writing the instructions in a computer language is called programming.  Constants are the types of data that do not change throughout the program.  Comments allow you to put remarks and notes to the program’s source- code.  An operator is a program element that is applied to one or more operands in an expression or statement.  Pseudocode is an artificial and informal language that helps the programmers to develop algorithms. A. Choose the correct answer. 1. The _____________ operator is used to store value in a variable. a) Relational b) Logical c) Assignment d) None of these 2. >= is an example of _______________ operator. a) Logical b) Relational c) Arithmetic d) None of these 22

3. != stands for _______________ a) Less than or equal to b) Not equal to c) Greater than or equal to d) Assignment 4. A ________________ operator combines two conditions together to check. a) Logical b) Division c) Addition d) None of these 5. Artificial code used to understand program flow is called ____________. a) Constants b) Comment c) Variable d) Pseudocode B. Fill in the blanks. Compiler, Variable, operands, begin, Machine 1. _____________ language is the only language that a computer can understand. 2. __________ translates a program at once and generates a list of errors, if any. 3. Value of a ___________________ can change throughout the program. 4. An operator is applied on one or more _______________. 5. A pseudocode must start with the keyword ____________. C. Tick () the correct statement and cross () out the wrong one. 1. Understanding the machine language is easy and fun. 2. Fourth generation languages use mnemonic codes. 3. A program written in assembly language is called the Source program. 4. An assembler converts assembly language program into machine language. 5. Modern computer language are machine dependent. D. Answer the following questions. 1. List the names of 4 generations of computer programming languages. ________________________________________________________________________ 2. How a program is different from a pseudocode? ________________________________________________________________________ ________________________________________________________________________ 3. What do you mean by data, data type and variable? ________________________________________________________________________ ________________________________________________________________________ 23

4. Explain NOT operator with suitable example. ________________________________________________________________________ ________________________________________________________________________ 5. List the steps required in planning of a program? ________________________________________________________________________ ________________________________________________________________________ E. Write Pseudocodes to do the following. 2. Accept the radius of a circle and 1. To find the result of: (a * b)/(a + b) find its area. where values of a and b are input by user. _____________________________ _____________________________ _____________________________ _____________________________ _____________________________ _____________________________ _____________________________ _____________________________ 1. Make a small presentation of computer languages under the categories of Procedural and Object Oriented Language with their salient features. 2. Search Internet and prepare a brief report the working of a compiler and an interpreter. 3. Write a pseudocode to accept five numbers and finally display the greatest number of them all. Teacher's Signature : __________________ Teacher's Remark : WEB https://en.wikipedia.org/wiki/Computer_programming http://study.com/academy/lesson/pseudocode-definition-examples-quiz.html LINKS Teacher’s Corner Teachers must take up some small examples from students’ real life around to explain the concepts in an easier fashion. 24

3 MS PowerPoint: Animation and Transition Dear Teacher, Yes Students, How can we apply Animation and animation and transition transition effects on effects to the objects of a presentation make it effective. Let's a presentation? We want learn about these to learn about it. effects in detail. Animation is one of the chief ingredients of electronic presentations. An animation makes the presentation effective, attractive and professional looking. We have discussed earlier (in the previous classes), that we can add animation to a PowerPoint presentation. In this chapter, you will learn about adding different types of animation effects to the presentation. Animation A simulation of movement, created by displaying a series of pictures, or frames is called animation. An animation contains visual effects (including movement) and sound effects. Animation can be applied to the text, images, shapes, tables, SmartArt and other objects. Cartoons on television are an example of animation. There are different types of animation effects: 1. Entrance Animation Effect: It determines the manner in which an object enters onto the slide. 25

2. Emphasis Animation Effect: It does something to draw attention to an object. For example, the object can become larger. 3. Exit Animation Effect: It determines the manner in which an object leaves a slide. 4. Motion Paths Animation: It determines how an object moves around a slide. To apply an animation to an object The steps to apply animation to an object are: 1. Select the object that you want to animate. 2. On Animations tab, click on More drop-down arrow in the Animation group. Or, click on Add Animation button in Advanced Animation group. 12 26

3. A drop-down menu appears. Select the desired effect. 3 4. The effect is applied to the object. The object will have a small number next to it (to show that it has an animation). Note In the side pane, a star symbol also appears to the slide. 4 Note At the bottom of the menu, you can access even more effects. Note Some effects will have options you can change. For example, with the Wheel effect you set the number of spokes. These options can be accessed from the Effect Options button in the Animation group. 27

To add multiple animations to an object Selecting a new animation from the menu in the Animation group replaces the object’s current animation. However, you can add more than one animation to an object. The steps to add more animation to an object are: 1. Select the object. 2. On Animations tab, in Advanced Animation group, click on the Add Animation button and select the desired animation effect. To reorder the animations 1. Select the number of the effect that you want to change. 2. On Animations tab, in Timings group, click on Move Earlier or Move Later commands to change the order. Remove an Animation Steps to remove an animation are, 1. Select the small number located next to the animated object. 2. Press the Delete key. The animation will be deleted. Do it Yourself Open MS PowerPoint and create a presentation as per the guidelines given below: 1. Insert two objects in the slide. 2. Select the first object and apply an animation to it (from Animations tab, of Entrance type). 3. Select the second object and apply an animation to it (of Emphasis type). Preview the animation. 4. Save the file with the file name ‘yourname_class'. 28

Preview Animation When you play the slide show, any animation effect which have applied to the objects in the slide will show up. You can also quickly preview the animations for the current slide without viewing the slide show. The steps to preview the animation are: 1. Navigate to the slide you want to preview. 2. On Animations tab, click on Preview command. The animations for the current slide will play. Note You can modify the animation in terms of starting method, duration and delay. On Animations tab, in Timing group, set the different options of Start, Duration and Delay. Start : It specifies the option/method to play the animation. There are three options: • Start on Click: This will start the effect when the mouse is clicked. • Start With Previous: This will start the effect at the same time as the previous effect. • Start After Previous: This will start the effect when the previous effect ends. Duration : It specifies the timing of the animation effects. Delay : It sets the delay time before the animation begins. Do it Yourself Open the presentation that you created in the previous activity and do the following as per the guidelines: 1. Select the first object on the slide and add an exit effect to it. 2. Select the second object and add two more animation effects to it. 3. Use the Animations tab to reorder the effects on both the objects. 4. Preview the animation. 5. Save the changes. 29

Motion Path A ‘Motion Path’ is used to move the object in a specified pattern. The steps to apply a motion path to an object are: 1. Select the object. 2. On Animations tab, click on More drop-down arrow in the Animation group. Or, click on Add Animation button in Advanced Animation group. 2 3 3. A drop-down menu appears. In Motion Note Paths section, select the desired path. If you choose the Custom Path option, Preview the animation. you will draw the path that you want the object to take. 1. Draw a custom path. To stop drawing a custom path, press Esc. 3 30

Advanced motion path options 1 If you want more custom path options, 1. Click on More Motion Paths at 2 the bottom of the Animations 3 drop-down menu. 2. The Change Motion Path dialog box appears. Click on required animation to see the preview (of how the object will move on the slide). 3. Click on OK button to apply the effect. Transitions Do it Yourself Slide transitions are animation-like Open the presentation that you edited in the effects that occur in Slide Show view, previous activity and do the following as per when you move from one slide to the the guidelines: next during an on-screen presentation. You can control the speed of each slide 1. Insert a new blank slide. transition effect and you can also add 2. Insert a shape (5-point Star) (from Insert sound. tab, in Illustrations group) in the slide. There are three categories of transitions: 3. Select the object (shape) and add a motion path (Funnel) to it. 4. Preview the animation. 5. Save the changes. 1. Subtle: These are the most basic types of transitions. They use simple animations to move between slides. 2. Exciting: These are complex animations to transition between slides. Adding moderate transitions can give a nice touch to the transition between important slides. 31

3. Dynamic Content: If you're transitioning between two slides that use similar slide layouts, dynamic transitions will move only the placeholders, not the slides themselves. When used correctly, dynamic transitions can help unify your slides and add a further level of polish to the presentation. To apply a transition The steps to apply transition to a slide(s) are: 1. Select the slide (that will appear after the transition) in the Slide Navigation pane. 2. On Transitions tab, in Transition to This Slide group, click on More drop-down arrow. A drop-down menu appears. 1 2 3. Select the desired transition to apply it to the selected slide. • Click on Apply To All button in Timing group (on Transitions tab) to apply the same transition to all the slides in the presentation. 4 3 4. Click on Preview button to preview the slide transition. 32

Modifying transitions You can customize the direction of the transition. 1. Select the slide (with the transition, that you want to modify). 2. On Transitions tab, in Transition to This Slide group, click on Effect Options and choose the desired option. 12 Setting the timing for a transition The steps to set the duration of the transition between the previous slide and the current slide are: 1. On Transitions tab, in Timing group, in Duration box, type or select the speed that you want. To specify how long before the current slide advances to the next, use one of the following procedures: • To advance the slide when you click the mouse, select the On Mouse Click check box. • To advance the slide after a specified time, in the After box, set the time that you want. Add Sound to Slide Transition The steps to add a sound to a slide transition are: 1. Select the desired slide (that will appear after the transition) in the Slide Navigation pane. 2. On Transitions tab, in Timing group, click on Sound drop-down list box and choose a sound to apply it to the selected slide. 33

Remove a Transition The steps to remove a transition are: 1. Select the slide with the transition that you want to remove. 2. Choose None from the Transition to This Slide group on the Transitions tab. The transition will be removed. Do it Yourself Open the presentation that you edited in the previous activity and do the following as per the guidelines given below: 1. Select a slide, and apply a transition. 2. Change the transition duration. 3. Add a sound effect to the transition. 4. Apply a dynamic slide transition to the slide 2. 5. Remove the transitions in the slides. 6. Save the changes. Using Action Buttons Action buttons are built-in shapes that can be used to launch an action in the presentation such as go to next/previous or a specified slide, play a sound/video or run a program. The steps to add an action button on a slide are: 1. Select the slide (on which you want to add the action buttons) in Slide Navigation pane. 12 5 4 6 3 34

2. On Insert tab, in Illustrations group, click on Note Shapes command. A drop-down menu appears. Other option can also be selected 3. Select the desired action button. in the dialog box. For example, you can also play a sound with 4. Drag and draw the action button (shape) on the the action button. slide. The Action Settings dialog box appears. 5. In Action on click section, click on drop-down arrow of Hyperlink to: and select the required action. For example, click on Next Slide option. 6. Click on OK button. Glossary Animation : A simulation of movement, created by displaying a series of pictures, or Transition : frames is called animation. Transition is an animation-like effect that occur in Slide Show view, when you move from one slide to the next during an on-screen presentation. Quick Review  An animation contains visual effects (including movement) and sound effects.  Different types of animation effects are Entrance Animation Effect, Emphasis Animation Effect, Exit Animation Effect and Motion Paths Animation.  A ‘Motion Path’ is used to move the object in a specified pattern.  Three categories of transitions are Subtitle, Exciting and Dynamic Content.  Action buttons are built-in shapes that can be used to launch an action in the presentation. A. Choose the correct answer. 1. Entrance animation effect, determines the manner in which an object _________onto the slide. a) Exits b) Animates c) Enters d) All of these 2. ______ animation effect, determines the manner in which an object leaves a slide. a) Exit b) Close c) Out d) All of these 35

3. Motion Path animation, determines how an object _________ around a slide. a) Entrance b) Moves c) Animates d) Exit 4. Subtitle is the most common type of _______________ in PowerPoint. a) Transitions b) Exciting c) Dynamic Content d) None of these 5. To remove a transition from a slide, click on None option, in Transition to This Slide group on ________ tab in PowerPoint. a) Animations b) Transitions c) Slide Show d) None of these B. Answer the following questions. 1. What is an animation? ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ 2. Write the steps to apply an animation to an object in the presentation. ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ 3. Write the steps to preview the animation. ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ 4. What is the use of Motion Path tool in Animation tab? ________________________________________________________________________ ________________________________________________________________________ 36

________________________________________________________________________ ________________________________________________________________________ 5. What is Slide Transition? ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ 6. Write the steps to apply a transition to a slide in the presentation. ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ 7. How can you add sound to a slide transition? ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ 8. How are Action buttons useful in a slide show of a presentation? ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ 9. Write the steps to add an action button on a slide? ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ 37

C. Tick () the correct statement and cross () out the wrong one. 1. An animation doesn’t have any role to make the presentation effective. 2. An animation can be applied to an object using Transitions tab. 3. Multiple animation effects can be applied to an object. 4. To preview the animation effects, click on Animation tab → Preview command. 5. A Motion Path is used to move the object in a specified pattern. Create a PowerPoint presentation as per the guidelines given below: 1. There should be at least five slides in the presentation, including a Title slide. 2. Apply a custom theme, colors, and fonts to the presentation. 3. Presentation must include at least one of the following: • Text Box • Word Art • Image • Video • Table • Chart of Graph • SmartArt 4. Apply animations to all the objects. 5. Add action buttons to go to next and previous slide. 6. Apply transitions between slides. 7. Save the presentation with the file name 'yourname_class_rollno'. Teacher's Signature : __________________ Teacher's Remark : WEB http://www.gcflearnfree.org/powerpoint2013/10 http://www.dummies.com/how-to/content/how-to-create-a-powerpoint-2013- LINKS slide-transition.html Teacher’s Corner In addition to practical concepts, teachers are advised to emphasise the significance of planning the theme and animation of the presentation suitably before practically doing it. 38

4 Game Creation in Scratch Dear Teacher, Yes Students, We want to learn We shall learn creating how to create simple simple game in Scratch but games in Scratch. before that we need to Can we do so? learn certain concepts necessary to achieve this. Since previous classes we have learnt a lot in Scratch. This chapter will enable us to create a simple game in Scratch. First we will have a quick recall of main features of Scratch. Scratch Interface Scratch Menu bar: This bar displays simple menus named File, Edit, Tips and About. It also displays a set of icons to duplicate, delete, grow, shrink and get help on the selected sprite on the stage. 39

Stage: It is the place where you keep the sprites that together make your animation. Stage also shows the output of your animation script. Stage displays icons at its top for maximising, restoring it and to Run and Stop the animation. Sprite: Characters that together make the animation are called Sprites. Cat is the default sprite and mascot of Scratch too. More sprites can be added from Sprites Library, from an external file, a picture from camera or a newly drawn sprite using sprite painter. Sprites Panel: It lists all the sprites added into the animation. Scripts Panel: It lists all the script blocks that are used to design the animation script. Blocks are arranged in various categories like Motion, Events, Pen etc. Script panel also contains a large work area called Script Editor in which animation script is created by drag- dropping the required blocks. Script: It is the set of blocks arranged to define how the desired animation should work. Script is created by drag-dropping blocks from the set of blocks. Sound Panel: This panel provides a simple sound editor to edit the sound and apply simple sound effects. Sounds can be added here from Sound Library, from computer or by direct recording your voice. Launching Scratch Start menu >All Programs > Scratch folder > Scratch option. Scratch Events An event is any action performed by user or program. For example, user clicking with mouse on the sprite, pressing a key on the keyboard, an sprite broadcasting message to other sprites etc. Scratch provides a set of event blocks to handle such events. 40

They are found in Events category in Scripts tab. Some most commonly used events are:  When Start Animation (green flag) is clicked.  When a key is pressed on the keyboard.  When the sprite is clicked.  When sprite sends messages to all other sprites (broadcast).  When sprite receives a message broadcast by any sprite. Event blocks help us in making our animations interactive. Users can interact with our animation through events. For example, user can click on the sprite to make it move or user can press the arrow keys to move a sprite in different directions. Common Motion Blocks Some frequently used Motion blocks are listed below: Moves the sprite forward for given steps. Turns the sprite clockwise by given degrees. Turns the sprite anticlockwise by given degrees. Turns the sprite towards up, down, left or right direction. Moves the sprite to the given coordinates on stage. Floats the sprite for given seconds towards given coordinates. Moves the sprite with mouse pointer. Making Sprites Talk to Each Other Consider the previous example of Apple and Beetle. Let us help the Apple broadcast a message to the Beetle and then Beetle should respond to it.  Open the previous file and in the Sprites panel, select the Apple.  Drag-drop the Events block when this sprite clicked in the script editor.  Drag-drop the Looks block say ___ for __ secs as shown here.  Change the value of say to: Hi Beetle!.  Drag-drop the Events block broadcast ____ and set its text to: Hi Beetle! by using new message... option in the drop down of the block. 41

 Click on the Apple to test your script.  In the Sprites panel, select the Beetle.  Drag-drop the Events block when I receive _____ in the script editor and set its text to: Hi Beetle! by using new message... option in the drop down of the block.  Drag-drop the Looks block say__ for __ secs as shown here.  Change the value of say to: I am hungry, and I will eat you!. Adding Sound from Sound Library Sound library of Scratch contains a collection of several sounds which can be added in the animations. To open the sound library, click on Choose sound from library button in Sound tab. In the library, select the desired sound and click OK. The sound will be added. Common Sound Blocks Plays the selected sound Plays the selected sound until entire sound is played. Stops all sounds Plays selected drum for given duration Plays the selected note for given duration. Activates the selected instrument. Pauses the instrument for given duration. Using Variables We know that programs need input to process and generate desired output. How does a program manage the values input by the user? The answer is variables. A variable is like a basket in which the value input by the user is kept. Each variable is identified by a unique name in the program. Variables store result of the processing also. 42

A variable can store one value at a time. If a new value is stored in it, the previous value gets overwritten and cannot be retrieved. So, if you need to calculate the sum of two numbers, how many variables does your program need? One variable for storing first number, another variable for storing second number and another, third variable to store their sum. Total, three variables are required. Let us discover how do we do this in Scratch. Creating Variables Let us see the steps to create a variable by the name A.  In Scripts tab, go to Data category.  Click on the option Make a variable.  In the dialog box, enter the name of the variable as A and click on OK. Notice that variable A is created. A checkmark besides it will show the variable on the stage. Using the steps above, try creating two more variables by the names B and sum. Notice the following two choices in New Variable dialog box: Making Decisions To control the flow of animation many times certain checks need to be done and depending on the condition the animation should change. Checking certain condition and deciding the course of the script is called taking decisions. It is done by using Control blocks if and if-else. For example, we can check the direction of the sprite and if it is not moving in the desired direction, we can change it. if block if block is associated with a condition. All the blocks that are part of if block are executed only if the condition is true. Let us understand this with following script. if block makes use of comparison blocks in Operators category. In this script, a variable passcode is used. First, value entered by the user will go into Sensing block answer. if block condition is created by the help of green coloured Operators block equal-to. Before = sign, answer block is kept and after = sign, the passcode harry123 is kept. Both the values will be compared for equality (similar). If values of answer block is harry123 then message WELCOME will be displayed. 43

if-else Block We have just seen that the blocks inside the if block execute only if the condition associated with the if block is satisfied (true). There are situations where you may need to perform some other action when if condition fails or returns false. This is handled by else part of if-else block. The blocks inside the else block execute only if the condition associated with the if block is not satisfied (false). Consider the script shown here. Whenever the Cat is not touching the bananas, the condition: touching Bananas will return false and in such case else part will execute, making the Cat say: Where are the Apples? Challenge Can you modify the above script so that when Cat touches Apples, it should say Wow! I love Apples? Operator Blocks Operator blocks are used to process the data in various ways and to compare the values. For example, arithmetic operations (+, -, /, *), comparisons (<, =, >) and picking random numbers etc. Try this script that displays the sum of two numbers in variables A and B. Generating Random Numbers We can generate random numbers between two given numbers by using Operators block pick random __ to __. For example, following block will move the sprite to random x coordinates between -200 and 200 and y coordinate 165. This way, every time this block executes, the sprite will be placed randomly anywhere at the top of the stage. Reiteration When certain blocks need to be executed repeatedly then it is called reiteration or looping. For example, showing a star twinkling, heart beating, light bulb flashing, jumping a sprite etc. Reiteration is implemented by repeat, repeat until and forever blocks which are found in Control category. 44

repeat block executes the enclosed blocks as many times as the number mentioned in its value section while repeat until block takes a condition and executes enclosed blocks as long as that condition becomes true. repeat block is useful when you need to execute certain blocks repeatedly for a given count. repeat until block can be used when you need to control the animation on the basis of a condition such as until sprite touches another sprite, until player’s life in a game becomes 0, until user clicks a particular key. forever block executes the enclosed blocks infinitely. While using such block, it is necessary to make provisions to break the loop and come out of it using if block. Let us make the Cat jump 5 times using repeat block. Open a new project in Scratch.  Add Events block when this sprite clicked to the script editor.  Add Motion block go to x:__ y:__ and set its x and y to 0.  Add Control block repeat as shown here and set its repeat value to 5.  Add Motion block glide __ secs to x:__y:__ inside repeat as shown here and sets its timing to 1 secs, x to 0 and y to 25.  Add Motion block glide __ secs to x:__y:__ as shown here and sets its timing to 1 secs, x to 0 and y to -25. Now, click on the Cat. It will first go to coordinates 0,0 then it will glide up to coordinates 0, 25 taking 1 second and glide back down to coordinates 0,-25. This will be repeated 5 times. Why? The repeat block will execute both the glide blocks 5 times as you have specified. Infinite Reiteration When blocks are repeated infinitely then it is called infinite reiteration or infinite looping. For example, showing a star twinkling, heart beating etc. Let us take sprite Heart from the Things category of Sprites Library.  Take Heart sprite on the stage.  Add Events block when this sprite clicked to the script editor.  Add Control block forever as shown here.  Add Looks block change size by and set its value to 25.  Add Control block wait and set its value to 1 secs.  Add Looks block change size by and set its value to -25. Click on the Heart. Its size will increase by 25 pixels and after a wait of 1 second, its size will decrease by 25 pixels (-25). This will repeat forever until you stop the animation. 45

Challenge Can you interpret what this script is doing? The sprite is a small Star. Drawing with Pen Pen blocks are used to draw figures. pen down block sets the pen ready to draw and pen up block unsets the pen to draw. Drawing is done by moving the sprite in different directions to get the desired figure. Pen blocks also allow setting and changing the pen colour, shade and size etc. 1. 1. Clears all pen marks on the screen 2. Draws a copy of the Sprite on the Stage. 2. 3. Turns the pen feature on inside a sprite; the sprite will pen on the screen wherever it moves until the pen is 3. turned off 4. Turns the pen feature off, stopping a sprite from 4. penning 5. Sets the color of the pen to a color chosen by the 5. programmer 6. Changes the pen color by a certain value 6. 7. Sets the color of the pen by using a number system 7. 8. Changes the shade of the color by a chosen value 9. Sets the shade of the color to a chosen value 8. 10. Changes the size of the pen by a chosen number 11. Sets the size of the pen to a chosen number 9. Let us see some examples of using pen block. 10. Drawing a square: In the script shown here, after 11. setting the pen down and setting its colour to yellow, the repeat block is executing 4 times. In every execution of repeat block, pen is moving 100 steps and turning by 90 degrees. This way, a square will be drawn. wait block is added to slow down the script so that user can observe the pen movement. 46

Drawing a rectangle: Here, in repeat block, first, pen will move 100 steps, drawing one long side of rectangle and turn 90 degrees. Then, it will move 50 steps drawing one shorter side of rectangle and turn 90 degrees again. After next iteration the rest of the rectangle will be drawn. Drawing a circle: This script draws a circle. Pen turns 10 degrees and moves 10 steps. This is repeated 36 (360/10) times to make a circle. Drawing a hexagon: This script draws a hexagon. After every 100 steps, the pen turns 60 degrees. This is repeated 6 times to complete the figure. Notice that it is the modification of previous script. Drawing a triangle: This script draws a triangle. After every 100 steps, pen turns 120 degrees. This is repeated 3 times to complete the triangle. Note It is a good idea to use wait block in loops to test and check the scripts. Afterwards, wait blocks can be removed. 47

Guided Project: My First Game in Scratch What is the game about? In this simple game, we shall make a froggy move leftward or rightward using arrow keys. A bug will fall randomly from the top which froggy needs to eat before the bug touches the ground. Froggy scores 1 point every time it is successful in eating the bug. There are 5 lives during which player has to gain maximum score. The game stops when the bug touches the ground 5th time. What do we need? Sprites: frog and beetle Variables: Variable score to keep the score of the player and variable life to count the lives available to the player. Stage Preparation  From Sprite gallery, add a frog and a beetle from Animals category.  In Sprites palette, select stage backdrop and go to Backdrops tab.  Click on Choose backdrop from library option.  Select the backdrop blue sky.  In backdrop editor, use Select tool and click on the blue sky picture. It will be selected.  Click on Ungroup tool to break the picture into its separate parts.  Click and delete unwanted parts and resize the remaining part so that backdrop looks as shown here. 48

Adding variables to The Stage  In Scripts tab, go to Data category and click on Make a Variable option.  Give variable name as score and click OK.  Similarly, create the variable life. Finally, the stage should look like this: Game Control Script for Froggy Making the Froggy Move  In Sprites palette, select the sprite Frog.  In Scripts tab, go to Events category and add when ____ key pressed block to your script. Select right arrow from the keys drop down.  Go to Motion category and add point in direction __ block and set its value to 90.  Add move __ steps block and set its value to 10.  Create a similar set of instructions for event: when left arrow key pressed and set the direction to -90. Game Control Script for Beetle Initialising variables and placing the beetle randomly on the stage top  The game will start when user clicks on Run animation icon so add when flag clicked block from Events category.  Use Data block set to set variable life to value 5 and variable score to 0.  The beetle should be placed on top of stage at y=160 and x=any random value between -200 and 200. Use Motion block go to x: __ y:__ along with Operator block pick random with values between -200 and 200 for x and 160 for y. 49


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