Вы находитесь на странице: 1из 106

Contents image 1

CHAPTER 1

Formatting in MS Excel 2010

CHAPTER 2

Formulas and functions in MS Excel 2010

20

CHAPTER 3

More features of MS Word 2010

34

CHAPTER 4

Introduction to Flash

55

CHAPTER 5

Drawing and painting in Flash

64

Test Paper 1
CHAPTER 6 Language of the Web-HTML

77

CHAPTER 7 Computer software and languages

89

CHAPTER 8Your computer under attack!

95

CHAPTER 9 More on QBASIC

101

CHAPTER 10 QBASIC graphics and sound

116

Image 2
Image 3
Image 4
Image 5
Image 6
Image 7
Image 8
Image 9
Test Paper 2

133

Nationals Cyber Olympiad

135

CHAPTER 1
Formatting in MS Excel 2010
IN THIS CHAPTER
We will learn about

Formatting
Aligning data in a cell
Formatting numbers
Formatting text
Cell borders

Adding pattern and color to cells

Auto Fill
Creating custom lists
FORMITTING
Worksheets are created to present information in a way others will understand.
To achieve this goal, we must format the worksheet to make it easy to understand and also attractive to look at. You
can format the font, fill color in cells and put a border around cells and so on.
Given below are some formatting features of MS Excel 2010.
ALIGNING DATA IN A CELL
When numeric data is entered into a cell, it is right aligned and text data is left aligned. You can change the horizontal
alignment, that is specify whether the data should be to the left, in the center or the right of the cell. The vertical
alignment too can be set, that is, you can specify whether the data should be in the center, justified or at the bottom of
the cell.
Follow these steps to change cell alignment:
1. Select the cells you want to change the alignment for.
2. From the Home tab, click on the Alignment dialog box launcher in the lower-right corner of the Alignment
group (fig. 1.1a).
Image 10
Fig. 1.1a
In the Format Cells dialog box (Fig. 1.1b):
3. Click on the Alignment tab.
4. Select the Horizontal alignment type such as General, Left, Center or Right.
5. Select the Vertical alignment type such as Top, Center or Bottom.
6. Click on the OK button.
Image 11
Fig. 1.1b
COOL TIP

You cha also set the alignment by selecting the required horizontal or vertical alignment from the Alignment group of
the Home tab.
Image 12
FORMATTING NUMBERS
MS Excel allows you to represent numbers in a cell in different formats.
1. Select the cell containing the number.
2. From the Home tab, click on the Number dialog box launcher in the lower-right corner of the Number group
(Fig. 1.2a).
Image 13
In the Format Cells dialog box (Fig. 1.2b):
3. Click on the Number tab.
4. Select Number from the Category box.
5. Select the number of Decimal places required.
6. Click on the OK button.
Image 14
Fig. 1.2b
Adding a currency symbol
You can also add a currency symbol to a number in the cell.
Follow these steps to add a currency symbol:
1. Select the cell or range of cells containing the numbers that you want to display with a currency symbol.
2. From the Home tab, click on the Number dialog box launcher in the lower-right corner of the Number group
(Fig. 1.2a).
In the Format Cells dialog box (Fig. 1.3a):
Image 15
Fig. 1.3a
3. Click on the Number tab.
4. Select Currency from the Category box.
5. Select the number of Decimal places required.
6. From the Symbol box, select the currency symbol that your want.
7. Click on the OK button.

For example, Column A is a set of unformatted numbers and Column B has the numbers formatted with the currency
symbol, thousand separator and 2 decimal places (Fig. 1.3b).
Image 16
Fig. 1.3b
Displaying numbers as percentages
Often in a worksheet, numbers have to be displayed as percentages. Excel multiplies the number by 100 and displays
the % character after the number.
Follow these steps to format a number as a percentage:
1. Select the cell you want to format.
2. From the Home tab, click on the Number dialog box launcher in the lower-right corner of the Number group
(Fig. 1.2a).
In the Format Cells dialog box (Fig. 1.4):
Image 17
Fig.1.4
3.Click on the Number tab.
4.Select Percentage from the Category box.
5.Select the number of Decimal places required.
6.Click on the OK button.
How will the following numeric data be displayed after the specified format has been applied?
Data

Format
4569

Number, 2 decimal places

4569

Number, 2 decimal places, thousand separator

Result

Currency, symbol
4569

Per cent

45

Per cent

0.45

Formatting data
Dates can be represented in different ways in MS Excel. For example, 12/03/12 can be represented as 12-Mar-12 or
March 12, 2012 and so on.

1. Select the cell containing the date.


2. From the Home tab, click on the Number dialog box launcher in the lower-right corner of the Number group
(Fig. 1.2a).
In the Format Cells dialog box (Fig. 1.5):
Image 18
Fig. 1.5
3.Click on the Number tab.
4.Select Date from the Category box.
5.Select the date format required.
6.Click on the OK button.
COOL TIP
The number group of commands on the Home tab gives you easy access to all of the above number formats.
% Per cent style
, Comma style
Number format
Decrease decimal
Increase decimal
Currency style
FORMATTING TEXT
When working with text, you can format its font too.
To format the font of cell contents:
1. Select the cell.
2. From the Home tab, click on the Font dialog box launcher in the lower-right corner of the Font group (Fig.
1.6a).
Image 19
Fig. 1.6a
In the Format Cells dialog box (Fig. 1.6b):
3.Click on the Font tab.

4.Select Font.
5.Select the Font style.
6.Select the size of font.
7.Select the Color of font.
8.Click on the OK button.
Image 20
Fig.1.6b
COOL TIP
Just like in MS Word, in MS Excel too, the font can be formatted using the options on the font group of the Home tab.
Select the font you want from the font name list box.
Select the font size.
Click on B for Bold, I for italic and U for underline.
Select the font color.
CLICK time
Shikha entered her marks in a worksheet as shown below:
A
1

TEST1

TEST2

TEST3

TEST4

TOTAL MARKS

English

20

18

20

19.5

Hindi

18

21

19

20

Maths

24.5

22

21

23

Science

22

19

22

21

Social science

15

20

20

19

Sanskrit

19.5

22

23

20

She wants to align all the numbers to the left, make column headings appear in the center (vertically), make the subject
names appear in blue and the column headings in red and bold. How can she achieve these effects?
Solution:

Aligning numbers
1. Select all the cells containing the numbers.
2. From the Home tab, click on the Alignment dialog box launcher in the lower-right corner of the Alignment
group.
3. In the Format Cells dialog box:
Click on the Alignment tab.
Select the horizontal alignment type as left in the Horizontal alignment box.
Click on the OK button.
Aligning the column headings
1. Select all the cells containing the column headings (cell B1 to F1).
2. From the Home tab, click on the Alignment dialog box launcher in the lower-right corner of the Alignment
group.
3. In the Format Cells dialog box:
Click on the Alignment tab.
Select the vertical alignment type as center in the vertical alignment box.
Click on the OK button.
Formatting font
1. Select Column A by clicking on the column letter.
2. From the Home tab, click on the font dialog box launcher in the lower-right corner of the Font group.
3. In the Format Cells dialog box:
Click on the Font tab.
Select the color of font as Blue.

4.

Click on the OK button.


Select Row 1 by clicking on the row number.

5. From the Home tab, click on the Font dialog box launcher in the lower-right corner of the font group.
6. In the format Cells dialog box:
Click on the font tab.
Select the font style as Bold.
Select the Color of font as Red.
Click on the OK button.
Sm image
Borders can be applied to cells in the worksheet in order to highlight important data.
Follow these steps to apply a border:
1. Select the cells you want to apply border to.
2. From the Home tab, click on the Font dialog box launcher in the lower-right corner of the Font group (Fig.
1.6a).

In the Format Cells dialog box (Fig. 1.7a):


3. Click on the Border tab.
4. Select the Presets Style.
5. Select the Line Style.
6. Select the Line Color.
7. Select the Border Style.
8. Click on the OK button.
Image 21
Fig. 1.7a
A

Mr. Jain

Mrs Khan

Mr Roy

Mrs Guha

Ms DSilve

Fig. 1.7b
The selected cells will display the chosen border as shown in Figure 1.7b.
COOL TIP
Click on the drop-down arrow beside the Borders button sm image in the Font group on the Home tab. Select a border
option from the drop-down menu that appears.
ADDING PATTERN AND COLOR TO CELLS
To draw attention to important data, you can also add a pattern or color to the cells.
Follow these steps to add pattern and color to cells:
1. Select the cells you want to shade.
2. From the Home tab, click on the Font dialog box launcher in the lower-right corner of the Font group (Fig.
1.6a).
In the Format Cells dialog box (Fig. 1.7a):
3. Click on the Fill tab.
4. Click to display a list of Pattern Colors.
5. Click to display a list of pattern styles.
6. Select Fill Color.
7. Click on the OK button.
Image 22

Fig.1.8
COOL TIP
You can also fill color in a cell by clicking on the arrow next to the Fill Color button sm image in the Font group on
the Home tab and selecting the color.
CLICK time
Shikha wants to add a border around her marks and a pattern to the cells with the subject names. How would you help
her?
TEST1

TEST2

TEST3

TEST4

English

20

18

20

19.5

Hindi

18

21

19

20

Maths

24.5

22

21

23

Science

22

19

22

21

Social science

15

20

20

19

19.5

22

23

20

Sanskrit

TOTAL MARKS

Solution:
To apply a border around her marks:
1. Select the cells.
2. From the Home tab, click on the Font dialog box launcher in the lower-right corner of the Font group.
3. In the Format Cells dialog box, Click on the Border tab.
Select the Presets Style, Line Style, Line color and the Border Style.
Click on the OK button.
To add pattern to cells:
1. Select the cells to be shaded.
2. From the Home tab, click on the Font dialog box launcher in the lower-right corner of the Font group.
3. In the Format Cells dialog box
Click on the Fill tab
Click on the arrow next to Pattern Color to display a list of colors. Select a color.
Click on the arrow next to Pattern Style to display a list of Styles. Select a style.
Click on the OK button.
AUTOFILL

Very often we have to fill in a series of numbers, months, or week days in a worksheet. Microsoft Excel has a feature
called AutoFill which quickly completes a series of data. It automatically continues a series based on a pattern you
specify..
The series is completed with abbreviations also. For example, when Jan is used instead of January, the series is
completed with Jan, Feb, Mar, . . , Dec. The series can be created across rows and as well as columns.
The Fill Handle
The Fill Handle (Fig. 1.9a) is a small black square in the lower-right corner of the selected cells. The pointer changes
to a black cross when you point to the Fill Handle. This is the Fill Handle cursor (Fig. 1.9b). The Fill Handle can be
used to copy data within a row or column and also to fill in a data series in consecutive cells.
18

20

19.5

19

20

22

21

23

19

22

21

20

20

19

22

23

20

21

Fig 1.9a
Fill Handle
18

20

19.5

19

20

22

21

23

19

22

21

20

20

19

22

23

20

21

Fig 1.9b
Fill Handle cursor
Follow these steps to use AutoFill:
1. Enter the first two values of the series. For example, Monday and Tuesday.
2. Select the two cells containing the starting values.
3. Move your pointer to the bottom right of the selected cells so that the Fill Handle cursor appears.
4. Click and drag the Fill Handle cursor until the desired range of data is displayed.
Image 23
Fig. 1.9c
5. Release the mouse button when the last name in the series is displayed on the screen tip.

Image 24
Fig 1.9d
A screen tip displays each value in the series while you are dragging the Fill Handle cursor.
Image 25
Fig 1.9e
The completed series when the mouse button is released.

DID YOU KNOW?


The secret use of the Fill Handle
The Fill Handle is truly a magical thing is MS Excel. In this lesson you have learned how to use the fill Handle to fill
in a series.
But, there is a secret use of the Fill Handle. It can also be used to clear the contents of a cell or a range of cells.
Image 26
1. Select the range of cells to be deleted.
Image 27
2. Click and drag the Fill Handle cursor back over the selected cells.
The cells will be greyed out.
Image 28
3. Release the mouse button and the contents of the cells will be cleared.
CHECK YOUR PROGRESS
What are the following buttons used for?
1. Sm image
2. Sm image
3. Sm image
COOT TIP
If the series is non-numerical, your you need to enter the first value in the series (such as ;January for the months
series) and drag the Fill Handle cursor to get the rest of the series.
CLICK time

Mrs Sood wants to type the months names in a sheet.


Help her get the names using the AutoFill option.
Solution:
1. Type the first two months names, that is January and February, in consecutive cells.
2. Select the two cells containing the starting values.
3. Move the pointer to the lower-right corner of the selected cells.
4. Click and drag the Fill Handle cursor until the last month name, that is December, is displayed on the screen
tip.
CREATING CUSTOM LISTS
A custom fill series (or custom list) is a set of data that is used repeatedly to fill a column or a row. It is also possible
to create your own list of data that works with AutoFill. You can also add data that you use frequently in this
customized list.
For example, if your regularly type the names of your teachers in your worksheet, you can these names to the Custom
list, making it easier to enter them whenever needed.
Follow these steps to create a Custom list:
1. Click on the File tab and go to Options (Fig. 1.10a).
2. Select the Advanced option and on right pane, scroll down till you see Edit Custom Lists button (Fig.1.10b).
3. Click on the Edit Custom Lists button.
4. This will open the Custom Lists dialog box (Fig. 1.10c).
Image 29
Fig.1.10a
Image 30
Fig.1. 10b
5. Select the NEW LIST option from the Custom lists box.
Image 31
Fig. 1.10c
6. Click in the List entries box. Type the items in your list and press the Enter key after each item.
7. Click on the Add button when you have completed the list.
Image 32
Fig. 1.10d

The list you have typed appears in the Custom lists box.
8. Click on the OK button.
Image 33
Fig 1.10e
Now, if you enter an item from your list into a cell in the worksheet and pull down the Fill Handle cursor (Fig. 1.10e),
you will find the rest of your list fills in (Fig. 1.10g).
Isnt that great!
A
1

Mr Jain

2
3
4
5
Ms DSilva

6
7

Fig. 1 10f
A

Mr Jain

Mrs Khan

Mr Roy

Mrs Guha

Ms DSilva

Fig. 1. 10g
CLICK time
Yash owns an ice-cream parlour and has to often type the flavours available in MS Excel.
Is there any way he can get the flavours list without typing them each time?
Solution:
Yash can store the names of flavours as a custom list. To create a custom list, he should follow the steps given
below:
1. Click on the File tab and go to Options.
2. Select the Advanced option and on right pane, scroll down till you see Edit Custom Lists button.
3. Click on the Edit Custom Lists button.
4. This will open the Custom List dialog box:

5. Choose the NEW LIST option and then click in the Custom Lists box.
6. Click in the List Entries box. Type the names of flavours in the List Entries box and press the Enter key
after each item.
7. Click on the Add button when youve completed the list.
8. Click on the OK button.
Now, whenever Yash wants the flavours list he will just have to type the first item from the list into a cell in the
worksheet and then pull down the Fill Handle cursor to get the names of rest of the flavours.
LET US RECALL sm image
Data in a worksheet can be formatted using the options of the Home tab.
Not only can text in cells be formatted but also numbers, dates and time.
Important data can be highlighted by adding a pattern, color or border to cells.
The AutoFill feature enables completion of a series of data in consecutive cells.
It is possible to create a custom list of data that works with AutoFill.
SM IMAGE KEYWORDS
FILL HANDLE the small black square in the lower-right corner of the selected cells
FILL HANDLE CURSOR the black cross that appears when you8 point to the black square in the lower-right corner
of the selected cells
AUTOFILL a feature which quickly completes a series of data
CUSTOM LIST a list created to be used with AutoFill
SM IMAGE TEST YOURSELF
A. Fill in the blanks.
1. Horizontal alignment can be set to ------------------, ------------------- or -----------------2. The ------------------ feature quickly completes a series of data.
3. Numbers are ---------------------- aligned in a cell.
4. A list created to be used with AutoFill is called a ---------------- list.
5. The ------------------------- is a small black square in the lower-right corner of the selected cells.
B. Madhumita wrote the following steps to create a Custom list, but they are not in the correct order. Put the
steps in the correct order.
1. Click on the File tab and go to Options.
2. This will open the Custom List dialog box.
3. Select the Advanced option and on right pane, scroll down till you see Edit Custom Lists button.
4. Type the item in your list and press the Enter key after each item.
5. Choose the NEW LIST option and then click in the List Entries box.
6. Click on the Edit Custom Lists button.
7. The list you have typed appears in the Custom Lists box.

8. Click on the Add button when you have completed the list.
9. Click on the OK button.
C. Match the columns.
Column A

column B

1. Custom list

a. design for letters, number and other characters

2. AutoFill

b. arrangement of data within a cell

3. Alignment

c. A list created to be used with AutoFill

4. Fill Handle cursor

d. feature that quickly completes a series of data

5. Font

e. The black cross that appears when you point to the black square in the lower-right corner of

the selected cells


D. Answer these questions.
1. Ravikant wants a blue border around a range of cells. Write the steps to add the border.
2. Why do you need to enter the first two values of a number series?
3. Why is color or pattern added to a cell?
IN THE LAB Sm image

E. Create a Custom list with names of planets of the Solar system. Also create the following worksheet in MS
Excel.
Planet

Average distance from the Sun (approx.)

Number of Moons

Mercury

57.9 million km

Venus

108.2 million km

Earth

149.6 million km

Mars

227.9 million km

Jupiter

778.3 million km

63

Saturn

1427.0 million km

62

Uranus

2871.0 million km

27

Neptune

4500 million km

13

1. Use AutoFill to get the names of the planets in the first column.
2. Fill the first row with orange color.
3. Apply a border to the first row.
4. Make the column headings bold and underlined.
5. Italicize the names of the planets.
6. The first column data should be left aligned; second column, canter aligned; and the last column, right aligned.
7. Change the font, font size and color to make the sheet attractive.
F.

Radha created a worksheet to keep an account of her pocket money expenditure.

SM IMAGE

Food

Drinks

Books

Clothes

January
February
March
April
May
June
July
August
September
October
November
December
1. Create this worksheet on your computer.
2. Use the AutoFill feature to get the names of months.
3. Enter data for all the months.
4. Format the worksheet by aligning text, changing the font and adding color and pattern to the cells.
Teachers notes ------------------- The teacher should help the students work with the Fill Handle. The other functions of the Fill Handle can
also be discussed.
The importance of using the formatting options to improve the readability and look of the worksheet
should be explained.
The teacher can demonstrate how to download the Rupee symbol (#) and then use it in MS Excel.
CHAPTER 2
Formulas and functions in MS Excel 2010
IN THIS CHAPTER
We will learn about
Formulas in MS Excel
Functions in MS Excel
A worksheet is an environment that makes working with numbers easy. It is like a large calculator. MS Excel has
many inbuilt functions to help us in the calculations. These calculations can be simple additions or more
complicated operations.
FORMULAS IN MS EXCEL
Formulas are equations used to perform calculations. In MS Excel, when you enter a formula it must begin with an
equal sign (=).

Parts of a formula
A formula contains one or more of the following elements:
Constants (Numeric values like 430.89,-90,etc. Or string values like Books, Names, etc.)
Cell references (D4,G7:H10,etc.)
Operators (+,-,*, /, <, >, =, etc.)
For example, consider the formula given alongside.
= IF (A1 > = 193, Yes, No)
Operator constant function cell reference
Here, IF is the function used.
A1 is the cell reference.
> = is the operator. 193, Yes and No are constants.
Entering formula into a cell
To enter a formula into a cell, click on the cell where you want to display the result and type the formula.
After you enter a formula and press the Enter key, the formula bar displays the formula but the cell displays the
result (Fig. 1.1a).
Image 34
There are many ways of entering a formula. You can either type the data in the cells or the cell addresses (cell
reference).
For example, Ms Sharma entered the following marks into an MS Excel sheet (Fig. 2.1b).
Image 35
To add Ritus marks, she can type either one of these formulas in cell G1:
=56+98+77+89 or = C2+D2+E2+F2
Both of these will produce the same answers, but the second one is much better and useful then the other.
If Ms Sharma changes Ritus English marks to 65, then the first formula will have to be retypes as: =
65+98+77+89 but no charge is required in the second case.
If cell reference is used in the formula, and any data changes, you do not have to change the formula.
Addition, subtraction, multiplication and division

The table alongside shows examples displaying how the basic arithmetic operations (multiplication, division,
addition and subtraction) can be done.
For example, Alka created a worksheet to keep track of her expenditure each month.
C2 D2, E2 and F2. The answer should be displayed in cell G1.
To do this:
1. Click on cell G2.
Operation

Symbol

Example

Multiplication

= A1*B2

Division

= A3/B1

Addition

= B2+A2

Subtraction

= A3-B1

Note: cell reference is used in the3 formulas.


Type the formula =C2+D2+E2+F2
Image 36
Fig. 2.2a
2. Press the Enter key.
The result will be displayed in the cell G2.
Image 37
Fig. 2.2b
To calculate the Amount Saved, money spent has to be subtracted from the money received. The formula =B2-G2
will be typed in cell H2.
Similarly, Alka will have to type the formulas for all the months.
When the same formula is used in many cells in a worksheet, you can copy it rather than typing it repeatedly.
When you copy the formula, you can use Copy and Paste option on the Home tab.
If the formula is to be copied into adjacent cells, you can use the Fill Handle cursor.
To do this:
1. Select the cells containing the formula (G2 in Fig.2.2b)
Image 38

2. Hold the mouse over the lower-right corner of the cell or cells selected, the cursor will change to a simple
black cross. This is the Fill Handle cursor.
COOL TIP
3. Click and drag the mouse in the direction you wish to copy the formula.
4. Release the mouse button.
Image 39
The result of the copied formula will be displayed in all the cells.
CLICK time
Mr Das works in a shop and has been asked to calculate the Profit/Loss on the sale of items. He has created the
following worksheet. Help him write the formulas.
Image 40
Solution:
To find the Profit/Loss:
1. In Cell D3, type the formula =C3-B3
2. Hold the mouse over the lower-right corner of the cell till the Fill Handle cursor appears.
3. Click and drag the mouse down till D7 to copy the formula.
4. Release the mouse button.
To find the Profit/Loss%:
1. In Cell E3, type the formula =D3/B3*100
2. Hold the mouse over the lower-right corner of the cell till the Fill Handle cursor appears.
3. Click and drag the mouse down till E7 to copy the formula.
4. Release the mouse button.
Sm image
FUNCTIONS IN MS EXCEL
Functions are predefined formulas that perform calculations on given values. The values on which calculations are
performed are called arguments of the functions.
In MS Excel, a function begins with an equal sign (=), followed by function name, an opening parenthesis, the
arguments for the function, and a closing parenthesis.
For example, consider the formula: = SUM (A1, B3, C6).
Here SUM is the function name;

A1, B3 and C6 are the arguments on which the function is applied.


The SUM function
The SUM function is the most popular function is MS Excel. As is obvious from the name, it adds the values in
each of the specified cells. For example, let us look at various SUM function, based on this worksheet (Fig. 2.3).
Image 41
Fig. 2.3
Example

Cells to be added

Result

=SUM (A1 : B3)

A1,A2,A3,B1,B3 and B3

27

=SUM (A1 :A4, B1)

A1,A2,A3 A4 AND B1

16

=SUM (A1, A3, A5)

A1, A3 and A5

DI YOU KNOW?
Auto Calculator
If you need to find a sum based on a row or a column of numbers and you do not want to type a formula, just select
your numbers and look at the status bar. You will find the sum of the selected cells there.
Image 42
Selected cells
Sum displayed on the Status bar
The AVERAGE function
The AVERAGE function finds the average of the specified cells data.
Average means adding all the specified cells and dividing by the total number of cells.
For example, let us look at various AVERAGE functions based on this worksheet (Fig. 2.4).
Image 43
Fig. 2.4
Example
=AVERAGE (A1:B4)

Cells to average

Result

A1,A2,A3A4,B1,B2,B3 and B4

=AVERAGE (A1:A4,25) A1,A2,A3,A4 and 25

= AVERAGE (A1,A3,B3) A1,A3 and B3

CLICK time
Saina entered the marks she got in four tests. Help her find th total and average marks.
Image 44
Solution:
1. To calculate the Total marks, in cell F2, type the formula =SUM (B2:E20
2. TO CALCULATE THE Average marks, in cell G2, type the formula =AVERAGE (B2:E2)
3. Select cells F2 and G2.
4. Hold the mouse over the lower-right corner of the selected cells till the Fill Handle cursor appears.
5. Click and drag the mouse down to copy the formulas for the other subjects.
6. Release the mouse button.
The MAX function
The MAX function returns the maximum value in the selected range of cells.
For example, let us look at various MAX functions based on this worksheet (Fig. 2.5).
Image 45
Fig. 2.5
Example

Cells to be considered

=MAX (A1 : A4)

A1,A2,A3 and A4

=MAX (A1 : A4, 245)


=MAX (B1, A3)

Result
4

A1,A2,A3,A4 and the number 245 245


B1 and A3

The MIN function


The MIN function returns the smallest or minimum value in the selected range of cells.
For example, let us look at various MIN functions based on this worksheet (Fig. 2.6).
Image 46
Example
=MIN (A1 : A4)

Cells to be considered
A1,A2,A3 and A4

Result
1

=MIN (A2 : A3, 800) A2,A3, and the number 800

=MIN (B1, B3)

The COUNT function

B1 and B3

The COUNT function returns the number of cells that contains numeric data in the selected range of cells.
Note: Blank cells and Text entries are NOT counted.
For example, let us look at various COUNT functions based on this worksheet (Fig. 2.7).
Image 47
Fig. 2.7
Example
=COUNT (A1 : A6)

Cells to be considered

Result

A1,A2,A3,A and A4,A5 and A6

=COUNT (A1 : B3, 100) A1,A2,A3, B1,B2,B3 and 100


=COUNT (A1, A3)

1
7

A1,A2 and 13

CLICK time
The number of cells received by a restaurant for food delivery per week is given below:
Image 48
Which functions can be used to find out the number of cells in the list, the maximum and minimum number of orders?
Solution:
1. The function used to find out the number of cells in the list: =Sum (A2 : 14)
2. The function use to find out the maximum number of orders: =MAX (A2 : 14)
3. The function used to find out the minimum number of orders: =MIN (A2 : 14)
Sm image
The IF function
You have learned about the IF statement in QBasic which ued to check a condition. Similarly, the IF function in MS
Excel checks a condition and returns one value if the conditions is true and a different value if the condition is false.
For example, Ravi typed the following IF function in the cell D5.
=IF (D3>=40, You have passed, You have failed)
You have passed will be displayed in the cell D4 only if the value in D3 is greater than or equal to 40.
Based on the worksheet (Fig. 2.3) consider the following examples.
Example
=IF (A2>=20, Good, Bad)

Condition

Result

Is A2 > or = 20?

Bad

=IF (B6= example, Right, Wrong) Is B6 = example? Right

=IF (A5< 1, 0.08, 0.05)

Is A5 < 1?

0.05

CHECK YOUR PROGRESS


Name the cells that will be considered when the following functions are entered into a worksheet.
Formula

Cells to be considered

= COUNT (D1, D4 : D7)

-----------------------------------------------------------

= SUM (H2, H5, H10)

-----------------------------------------------------------

=AVERAGE (D1 : F3)

---------

= IF (J10 > = RED, BED, FED)

CLICK time
Saina has calculated her total and average marks. If the average marks are equal to or greater than 20, she gets a
Distinction otherwise she gets a Merit. Write the IF function to display her grade.
Image 49
Solution:
In cell H2 type the following:
= IF (G2 > = 20, Distinction, Merit)
Drag the Fill Handle cursor to copy the formula for the other subjects.
The Insert Function FX button on the formula bar can be used to quickly enter a formula.
1. Click on the cell in which you want to enter the formula.
2. Click on Insert Function FX on the formula bar FX image
In the Insert Function dialog box:
Image 50
3. Type the function name in the Search for a function text box if it is not listed under Select a Function.
4. Select the function you want to use from the list.
COOL TIP
IMAGE 51
5. Enter the arguments (values or cell references to be used in the formula).
6. Click on the OK button.
LET US RECALL Sm image
Formulas are used in MS Excel to perform calculations.

MS Excel also has a set of predefined formulas to perform specific calculations.


All formulas and functions must begin with an = sign.
The Insert Function button on the formula bar can be used to quickly enter a formula.
KEYWORDS Sm image
FORMULA equations used to perform calculation
FUNCTIONS predefined formulas that perform calculations on given values
ARGUNENTS the values in a function on which calculations are performed
SUM FUNCTION adds the values of the specified cells
AVERAGE FUNCTION finds the average of the specified cells data
MAX FUNCTION returns the maximum value in the specified range of cells
MIN FUNCTION

returns the maximum value in the specified range of cells

COUNT FUNCTION returns the number of cells that contain numeric data in the specified range of cells
IF FUNCTION returns one value if a condition in TURE and another value if it is FALSE
Sm image TEST YOURSELF
A. Fill in the blanks.
1. Formulas must begin with -------------------------2. The ---------------------- can be dragged to copy the formula.
3. The ---------------------- function tells you how many numeric entries are there in the specified cells.
4. The ---------------------- function is used to check a condition.
5. The ---------------------- operator is used to multiply numbers.
B. Look at the spreadsheet given below and write the output of the formulas.
1. = SUM (C2 : C7)
2. = COUNT (A4 : D4)
3. = IF (D5 > C5, PROFIT, LOSS)
4. = MAX (D2 : D5)
5. = MIS (C1 : C4, C6 : C7)
6. = AVERAGE (C4, C5)
C. Answer these questions.
1. Why is it better to use cell references in a formula?
2. Give tow ways of adding up numbers in cells D1, D7, E3 and E8.
3. What is the difference between the SUM and the AVERAGE functions?
4. What is meant by a function and its arguments? Explain with an example.
Sm image

D. Enter the data given below into a worksheet.


Fruit Sale for the year 2010

Months

Apples

Oranges

Bananas

Grapes

January

2298

6899

4923

3349

February

3512

6755

4444

3899

March

4929

6541

3851

4336

April

5883

6032

3399

4892

May

6237

5822

3020

5217

June

6566

5968

3411

4764

July

6213

6333

3567

4523

August

6001

6544

399

4501

September

5799

6845

4255

4219

October

5527

7000

4873

3877

November

3914

7216

5214

3712

December

2564

7283

5521

3555

1. Format the font and numbers.


2. Adjust the column width and row height.
3. Create formulae to do the following.
Calculate totals for the month of January. (Copy the total for all the months.)
Calculate the total sale for each fruit.
Find out the average sale of bananas.
What is the maximum sale for the month of June?
What is the minimum sale amount of grapes?
Display Excellent Sale if the sale of oranges is greater than or equal to 5000, else display Need to improve.
E. The XIX Commonwealth Games (Delhi 2010) Fial Medals Tally is given below.
Countries

Gold medals

Silver medals

Bronze medals

AUSTRALIA

74

55

48

INDIA

38

27

36

ENGLAND

37

59

46

CANADA

26

17

32

SOUTH AFRICA

12

11

10

KENYA

12

11

MALAYSIA

12

10

13

SINGAPORE

11

11

NEGERIA

11

10

SCOTLAND

10

NEW ZEALAND

22

CYPRUS

NORTHERN IRELAND

SAMOA

WALES

10

JAMAICA

PAKISTAN

UGANDA

BAHAMAS

SRI LANKA

NAURU

BOTSWANA

CAYMAN ISLANDS

ST. VINCENT AND THE GRENADINES


1

TRINIDAD AND TOBAGO

CAMEROON

GHANA

NAMIBIA

PAPUA NEW GUINEA

SEYCHELLES

ISLE OF MAN

MARRTIUS

TONGA

BANGLADESH

GUYANA

SAINT LUCIA

1. Enter this data into a worksheet.


2. Use appropriate functions to find out the maximum number of Gold, Silver and Bronze medals, and the total number
of countries participating in XIX Commonwealth Games 2010.
Note: Remember that only numeric values are counted with the COUNT function.
Sm image PROJECT WORK
F.

Create a worksheet like the one shown alongside to help your younger brother/sister practice math problems

1. The answers column should have a red border around it.


2. In the marks column, use the IF function to award 1 mark for every correct answer.
3. Use the SUM function to calculate the Total marks. The total marks cell should have a yellow fill.
4. Use the IF function to display Well Done!!! if the total marks are more than 8 otherwise display you need to
practice

Image 52
G. Conduct a survey among the helpers in your school by asking them the following questions.
What is your educational qualification (primary school, Class X, Class XII, BA, MA)? Enter 1 in the appropriate
cell. For example, if the employee has studies up to Class X, enter 1 in the Class X column for that employee.
What is your annual income? Enter the annual income in the annual income column.
1. Find out the total number of employees who have studied up to primary school, Class X, BA and MA, respectively.
2. Find out the average annual income of all the employees and also the maximum and minimum incomes.
The final worksheet should have the following format:
Image 53
Teachers note ---------------------- The teacher could demonstrate how the AutoSum button can be used to enter some commonly used functions.
CHAPTER 3
More features of MS Word 2010
IN THIS CHAPTER
We will learn about
Autocorrect
AutoText
AutoComplete
Symbols and special characters
headers and footers
footnotes and endnotes
watermarks
AUTOCORRECT
You know that it is very important to check spelling in a typed document. Spell check is one of the most popular features
of MS Word. In fact, if you want, you do not have to run a spell check to look for spelling errors and then correct those.
MS Word can correct words as you type. This feature is called AutoCorrect. MS Word has a list of commonly
misspelled words such as teh for the, or receive for receive.

When you type a word that matches the

AutoCorrect entry, the computer automatically changer it to the correct spelling. You can also add or delete entries in the
list.
AutoCorrect is designed to:
1. Correct common typing or spelling errors automatically
2. Change two initial capitals
3. Capitalize the first letter of a day

4. Capitalize the first letter of a sentence


Image 54
Steps for adding entries to the AutoCorrect list
1. On the File tab, click on Option (Fig. 3.1a).
2. Click on Proofing in the left pane and then click on the AutoCorrect Options button on the right (Fig. 3.1b).
Image 55
Fig. 3.1a
Image 56
Fig. 3.1b
The AutoCorrect dialog box opens (Fig. 3.1c).
Image 57
Fig. 3.1c
3. In the Replace box, type a word or phrase that your often mistype, for example, address.
4. In the With box, type the correct spelling of the word, for example, address.
5. Click on Add.
Image 57
Fig. 3.1b
The misspelled word and the correctly spelled one are added to the list.
6. Click on the OK button.
Image 58
Fig. 3.1e
Next time when you misspell the word address it will be automatically corrected as you type.
Steps for changing AutoCorrect entries
1. On the File tab, click on Options (Fig. 3.1a).
2. Click on Proofing in the left pane and then click on the AutoCorrect Options button on the right (Fig. 3.1b).
The AutoCorrect dialog box opens (Fig. 3.2a).
3. Choose the entry in the list that you want to edit.
4. Type the new entry in the With box.
5. Click on Replace to change the entry in the list.

6. Click on Delete to remove the entry from the list.


7. Click on the OK button.
Image 59
Fig. 3.2a
When the Replace button is clicked the dialog box shown in Figure 3.2b appears.
8. Click on yes to change the AutoCorrect entry.
Image 60
Fig. 3.2b
CLICK time
Rahul often spells occasion as ocassion. He wants to add this entry to the AutoCorrect list in MS Word. What should
he do?
Solutions:
1. On the File tab, click on Options.
2. Click on Proofing in the left pane and then click on the AutoCorrect Options button on the right.
3. In the AutoCorrect dialog box:
Type the word ocassion in the Replace box.
In the With box, type the correct spelling of the word occasion.
Click on Add.
The misspelled word and the correctly spelled one are added to the list.
4. Click on the OK button.
AUTOTEXT
YOU CAN STORE REQUENTYLY USED TERMS USING Words AutoText feature.
AutoText is a way to insert or type the same thing over and over, but you have to press fewer keys to do so. you can, for
example, create a library of paragraphs for letters, or keep a selection of headers and footers. An AutoText entry can
store anything such as text and pictures.
An AutoText entry can be inserted by typing its name and pressing the F3 key.
For example, imagine you are writing a novel and the heros name is Ram Prasad.
To save time, create an AutoText entry called rp for Ram Prasad.
While typing the story, type ro and press the F3 key to change it to Ram Prasad.
Steps for creating an AutoText entry

1. Select the text you want to store as AutoText (for example, Ram Prasad).
2. On the Insert tab, click on the arrow in Quick Parts in the Text group (fig. 3.3a).
Image 61
Fig. 3.3a
3. Click on Save Selection to Quick Part Gallery.
4. In the Create New Building Block, enter a name for your entry and select AutoText from the Gallery drop-down list
(Fig. 3.3b).
5. Click on the OK button (Fig. 3.3c).
Image 62
Fig. 3.3b
Image 63
Fig. 3.3c
Now when you type your AutoText entry name (rp) into your document and press the F3 key, the complete text (Ram
Prasad) appears.
AUTOCOMPLETE
AutoComplete automatically lets you enter text into your document simply by typing a few characters. If AutoComplete is
on, a Screen Tip is displayed when you type the first few characters of an AutoText entry. At this point you can insert the
entry by pressing the Enter key or continue typing.
For example, while typing Your, you might see the phrase Yours truly. . . appear (Fig. 3.4).
Image 64
Fig. 3.4
So what is the connection between AutoComplete and AutoText?
Actually what appears in AutoCompletes little yellow boxes is the same as the content of AutoText entries. Any new
AutoText entry you create also appears in AutoCompletes little yellow boxes. So you only need to type the first few
characters before AutoComplete starts working. To insert the test into the text into the document, you simply need to press
the Enter key.
Steps for turning AutoComplete On or Off
1. On the File tab click on Options (fig. 3.5a).
2. Click on Advanced in the left pane (fig. 3.5b). Uncheck the Show AutoComplete suggestions checkbox.
3. Click on the OK button.
Image 65

Fig. 3.5a
Image 66
fig. 3.5b
CLICK time
How can you create an AutoText entry for Humpty named hd?
AutoText entry name while you type the nursery rhyme.
Solution:
1. Type Humpty Dumpty and select
2. On the Insert Tab, click on the arrow in Quick Parts in the Text group
3. Click on Save Selection to Quick Parts Gallery.
4. In the Create New Building Block dialog box, enter a name hd for the entry and select AutoText from the Gallery
drowp-down list.
5. Click on the OK button.
6. Type he and press the F3 key every time you want to type Humpty Dumpty in the nursery rhyme.
SYMBOLS AND SPECIAL CHARACTERS
Did you know that you can insert characters like and in your document? You will be wondering how this is
possible as these characters do not appear on your keyboard.
The steps for inserting a symbol are:
1. Click where you want to insert the symbol.
2. Click on the Insert tab (Fig. 3.6a).
Image 67
Fig. 3.6a
3. Click on the Symbol button in the Symbols group.
4. A list of some popular or recently used symbols appears (Fig. 3.6b). Select a symbol to be inserted.
5. Click on More Symbols to see all the symbols available.
6. The Symbol dialog box opens (Fig. 3.6c).
Image 68
Fig. 3.6b
7. In the Font box, select the font that you want by clicking on the button.
8. Click on the symbol that you want to insert
9. Click on Insert and then close.

HEADERS AND FOOTERS


Do you want to add information such as document title, page numbers, creation date, authors name and so on at the top
or bottom of a page? This can be done using the Header & Footer options in MS Word. Headers and footers are areas in
the top and bottom margins of the page where information like page number, date, authors name and so on can be
displayed.
Image 68
Header
Footer
Steps for inserting a header and
1. On the Insert tab, in the Header & Footer group, click on the Header or Footer.
2. Click on the header or footer format that you want to add to your document (Fig. 3.7c).
Image 69
Fig. 3.7b
Image 70
Fig. 3.7c
The Header area is displayed in the document and the Header &Footer Tools are displayed on the Design Tab (Fig.
3.7d).
Image 71
Fig. 3.7d
Type the header text in the Header area, or insert graphics and other objects by using the options in the Insert group on
the Design tab, Under the header &Footer Tools tab.
Let us take a close look at the Header &Footer Tools.
Image 72
Fig. 3.7e
1. To add the Footer, click on the Go to Footer sm button on the toolbar and repeat the steps followed for adding a
Header.
2. Click on close Header and Footer button when finished.
CHECK YOUR PROGRESS
Identify the following buttons on the Header and Footer Tools tab.

Sm image 1 to 4
CLICK time
Vani wants her name, the date and time in the header and the page number in the footer. Help her with the steps.
1. On the Insert tab, in the Header &Footer group, click on the Header or Footer.
2.

Click on the style of Header or Footer that you want to add to your document.

3. Type the text Vani in the Header area.


4.

To add the current date and time click on the Date & time button on the Design tabs Insert group.

5. Click on the Go to Footer button on the Navigation group of commands.


6. Click on Page number button.
7.

Click on Close Header and Footer button when finished.

FOOTNOTES AND ENDNOTES


Text that appears at the bottom of a page and gives some explanation about the text in the document is called a footnote.
Footnotes are usually in smaller print than the rest of the text in the document (Fig. 3.8a).
If the note is printed at the end of a document, it is called an endnote.
Footnotes and endnotes are generally used to explain, comment on, or provide suggestions for text in a document.
Example:
Reference marks
He nibbled on the vegetable peels. He twitched and knocked over a garbage tin, spilling the garbage out.
Separator line
Took small bites
Made a sudden quick movement
Footnote text

Fig. 3.8a
Steps for inserting a footnote or and endnote
1. Click on the Print Layout on the Document Views group of the View tab (Fig. 38b).
Image 73
Fig. 3.8b
2. In the document, click where you want to insert the reference mark.

3. Click on the References tab and, from the Footnotes group, click on ether the Insert Footnote or Insert Endnote
command button (Fig. 3.8c).
Image 74
Fig. 3.8c
4. Word inserts the note reference mark and places the insertion point in the text area of the new footnote or endnote.

He nibbled on the vegetable peels. He twitched and knocked over a garbage bin, spilling the garbage out.
1 footnote area
WordNote
places
the cursor
at the end of page in case of footnotes and at the end of the document in the case of endnotes.
reference
mark
5. Type the note text.
6. Double-click the footnote or endnote reference mark to return to the reference mark in the document.
COOT TIP
To scroll through all footnotes or endnotes:
Click on Draft on the Document Views group of the View tab.
Image 75
On the Reference tab, in the Footnotes group, click on Show Note.
Deleting a footnote or endnote
If you have inserted footnotes or endnotes into your document, and you want to later delete one of them, follow these
steps:
1. Select the note reference marks of the footnote or endnote that you want to delete (Fig. 3.9).
2.

Press Delete or Ctrl +X.

Select the footnote or endnote


Reference mark on the document
He nibbled on the vegetable peels. He twitched and knocked over a garbage bin, spilling the garbage out.
COOT TIP
You can use the keyboard shortcut Alt+Ctrl+F
(to insert a footnote) or Alt+Ctrl+D (to insert and endnote).
CLICK time

sushil wrote a story for his school magazine. He wants to create a footnote with meanings of difficult words used. Help
him create the footnote.
Sm image
Solution:
1. Click on the Print Layout on the Document Views group of the View Tab
2. In the document, click where you want to insert the reference mark.
3. Click on the References tab and, from the Footnotes group, click on either the Insert Footnote or Insert Endnote
command button.
4. Word inserts the note reference mark and places the insertion point in the text area of the new footnote or endnote.
5. Type the note text (meaning of the related word).
6. Repeat steps 1 to 5 to give footnotes for all the other words.
WATERMARKS
A watermark is a picture or text that appears dimly behind the text of a document.
For example, in the screenshot (Fig. 3.10), the picture of the pencil appears as a watermark.
Image 76
Fig. 3.10
Steps for adding a Picture watermark
1. On the Page Layout tab, in the Page Background group, click on Watermark (Fig. 3.11a).
2. Click on Custom Watermark.
3. Click on Picture watermark, and then click on Select Picture (Fig. 3.11b).
Image 77
Fig. 3.11a
Image 78
Fig. 3.11b
Click on Picture watermark option
Click on Select Picture
4. Select the picture that you want, and then click on Insert (Fig. 3.11c).
5. Select a percentage under Scale to insert the picture of a particular size (Fig. 3.11d).
6. Select the Washout check box to lighten the picture.
Image 79

Fig. 3.11c
Image 80
Fig. 3.11d
7. Click on the OK button.
Steps for adding a Text watermark
1. On the Page Layout tab, in the Page Background group, click on Watermark (Fig. 3.11a).
2. Click on Custom Watermark, and then click on Text watermark. Select or type the text that you want in the Text box
(Fig. 3.12).
3. Choose the font size and color.
4. Click on the OK button.
Image 81
Fig. 3.12
Note: you can see watermarks in the Print Layout View or an a printed document but not in the Normal View and Outline
View.
CLICK time
Amits teacher wants him to create a document with the school logo as the watermark.
Help Amit to do this.
Solution:
1. On the Page Layout tab, in the Page Background group, click on Watermark.
2. Click on Custom Watermark.
3. Click on Picture watermark, and then click on Select Picture.
4. Browse to select the picture of the school logo, and then click on Insert.
5. Select a percentage under Scale to insert the picture at a particular size.
6. Select the Washout check box to lighten the picture.
7. Click on the OK button.
LET US RECALL Sm image

AutoCorrect feature in Microsoft Word automatically corrects text as it is being typed.

AutoText is a feature that allows you to insert an AutoText entry by typing the first few characters of the entry.

AutoText and AutoComplete are related as what appears in AutoCompletes screen tip is the same as the
content of AutoText entries.

Header and footer areas are used to display information like page numbers, date, authors name and so on.

Footnotes and endnotes are text displayed at the bottom of a page or at the end of a document respectively the
are used to explain, comment on, or provide suggestions for text in a document.

KEYWORDS
AUTOCORRCT

a feature that automatically corrects text as it is

typed

AUTOTEXT a feature that is used to store formatted text, paragraphs or graphics


AUTOCOMPLETE a feature that allows you to insert an AutoText entry by typing the first few characters of the entry
HEADER area in the top margin of the page where information like page numbers, date, time and so on can be displayed
FOOTER area in the bottom margin of the page where information like page numbers, date and so can be displayed.
FOOTNOTE

text displayed at the bottom of a page used to explain, comment on, or provide suggestions of text in a

document
ENDNOTE

text displayed at the end of the document used to explain, comment on, or provide suggestions for text in a

document
WATERMARK text or graphic that appears dimly behind the text in the document
? TEST YOURSELF
A. Fill in the blanks.
1. The MS Word feature that corrects misspelled words as you are typing is called ------------------------2. -------------------------- is the cousin to AutoCorrect/
3. You must press the F3 key to activate an ------------------- entry.
4. --------------------------- feature automatically lets you enter text into your document simply by typing a few
characters.
5. The information at the top of a page is called the -----------------6. The text the appears at the end of document and gives some explanation is called an -------------------------7. ------------------------------ is a text or graphic that appears faintly behind the text in the document.
8. A watermark can be viewed in the Print view or on a ---------------- document.
B. State whether the following statements are True or False. Rewrite the false statements correctly.
1. The F5 key has to be pressed after typing the AutoText entry name to complete the text.
2. AutoText and AutoComplete are related features in MS Word.
3. Footer is an area in the bottom margin of the page where information like page numbers, date, time and so an can be
displayed.
4. The endnote appears in the footer area of the page.
5. Watermarks are intended for printed document.
C. Name the View you will use
1. to view the document background.
2. create an endnote.
3. to scroll through all the footnotes and endnotes.
4. to view the text watermark.
D. Answer these questions.

1. What is the difference between a footer and a footnote?


2. What is connection between AutoComplete and AutoText?
3. What is a watermark? What is the difference between a background and a watermark?
4. How can you see all the footnotes in your document?
IN THE LAB sm image
E. Add the following entries to the AutoCorrect list.
oowd

wood

teh

the

darb

drab

color

colour

atitching stiching
giggling

giggling

1. Type the text given below (with the misspelled words).


It was a day like the day before and the day after. The wind wrapped itself around the oowd cabin in gusting moons as
teh pioneer family within carried out their tasks pretending not to hear. They heard the wind, however. It had been their
contant companion on the open plains since their journey from Philadelphia two year before in teh spring of 1865.
Following the covered wagon train of ten, the wind had lifted the darb landscape into billows of dust falling on everyone
and everything until there seemed but one color and one sound.
Now Rachel sat on the bed hand-atitching a quilt while her mother hunched over a sewing machine across the room
rocking her feet backwards and forwards on a foot sewing machine.
The thumping counter pointed the wind outside. Laughter and giggling erupted form Rachels younger brother and sister
playing jacks on the floors and it brought a smile to their sisters face, but when she glanced back at their mother she
stopped smiling.
2. Check to see if the misspelled words ahve been corrected automatically or not!
3. Insert a header in the above document giving the page number, date and time.
4. Add the text Spring of 1865 as a watermark.
F.

Type the following poem.

I knew a man from Petushkee


As muddleheaded as could be.
He always got mixed up with clothes;
He wore his mittens on his toes,

Forgot his collar in his haste,


And tied his tie around his waist.
What a muddle head was he,
That man who lived in Petushkee!
1. Create AutoText entries for the following.
Pe for petushkee
Mu for muddle head
2. Continue typing the poem but use the AutoText feature to get the words Petushkee and muddle head.
They told him as he went about:
youve got ur coat on inside out!
And when they saw his hat, they said:
youve put a saucepan on your head!
What a muddle head was he,
That man who lived in Petushkee!
At lunch he scratched a piece of bread,
And spread some butter on his head,
He put his walking stick to bed,
And he stood in the rack instead.
What a muddle head was he,
That man who lived in Petuhkee!
Sm image
G. Type the following formulae in a Word document.
Image
PROJECT WORK
H. Type the following in a Word document.
Erosion is regarded not merely as the physical removal of soil by water and wind, but rather as the deterioration of all the
component part so the habitat in which man and his crops and livestock have to exist. Since there is no conclusive
evidence for any major climatic change in historic times to explain this deterioration, we must conclude that the eroding
of the total environment has been due primarily to thoughtless destruction of the vegetative cover. This has led to

deterioration of the microclimate above and below the surface, generally in the direction of a general drying out of the
soil which has exposed it to erosive action of wind and rainfall of high intensity or frequency, and to the loss of organic
matter in the soil, thus reducing its capacity to resist erosion by conserving the water that falls on the surface, if
everything possible is done within the total environment to conserve the naturally planted or cultivated vegetation, this
will also ensure optimal conservation of soil and water.
Add the following effects to the document:
1. A picture watermark background
2. Header with the text Example of Footnotes
3. Create reference footnotes with the meaning of the difficult words in the passage.
Teachers note ----------------------- Difference between AutoCorrect, AutoText and AutoComplete should be explained to the students with
appropriate examples.
CHAPTER 4
Introduction to Flash
IN THIS CHAPTER
We will learn about
to start Flash
components of Flash window
types of files in Flash
saving a Flash file
opening a saved Flash file
exit Flash
Flash is a multimedia graphic program. It is used to create projects with animation, video, sound and so on. Flash is
particularly useful for creating applications for the web as Flash files are very small and can be downloaded easily.
TO START FLASH
To start Flash follow these steps (Fig. 4.1):
1. Select Start From the Taskbar.
2. Click on All Programs. Select Macromedia and then Macromedia Flash 8.
Image 82
Fig. 4.1
Opening a new Flash File

When you start flash, the following screen will be displayed:


Click on Flash Document under Create New.
DID YOU KNOW?
Flash Document is the main file you work with in Flash.
Image 83
Fig. 4.2b
1. From the File menu, select New.
Image 84
Fig. 4.2b
2. Click on General tab.
3. Select Flash Document in the Type list.
4. Click on the OK button.
Image 85
Fig. 4.2c
The Flash Document window will now appear on the screen.
CHECK YOUR PROGRESS
Rajiv wants to create an animation and has opened a new file in Flash. What type of document should he select from the
list shown below?
Image 86
COMPONENTS OF FLASH WINDOW
The Stage, timeline, Layers, the Tools panel and Properties panel are various components of the Flash window.
Image 87
Fig. 4.3
Timeline
Layers
Tools
Stage
Properties panel

The stage is your workspace, this is where graphic, text, videos buttons and so on will be placed for the user to see.
The Timeline contains the sequence of images and other elements for the animation.
The Timeline tells Flash when an element should appear during animation.
It also includes the Layers of animations.
The Tools panel is divided into four sections- tools, View, Colors and Options.
The Tool section allows you to draw images and edit them. You must be familiar with some of the tools like the Line,
Rectangle, Ellipse and so on. You have seen these tools in Paint Too!
The view section allows you to change the view of the stage by- zoom in or zoom out.
The Colors section allows you to select colors, shading effects and so on.
The Options section has additional modifiers (options) of the Tool selected.
The Properties panel displays the properties of the object selected. For example, if you have selected a line on the stage,
the properties panel allow you to change the line color, width, style and so on.
CHECK YOUR PROGRESS
Identify the parts of the Flash window shown below:
Image 88
COOL TIP
If the Timeline in the Flash window is not displayed, what should you do?
Click window on the menu bar and select the Timeline option.
Sm image
DID YOU KNOW?
Jonathan Gay with other programmers started a software company called FutureWave Software and created
SmartSketch, a drawing application, in January 1993.
Sm image
Image 89
Smartsketch
In 1995, SmartSketch was modified and released as FutureSplash Animator.
Image 90
FutureSplash

futureSplash Animator was bought by Macromedia in 1996. Macromedia released it as Flash, combining Future and
Splash
Currently it is developed and distributed by Adobe Systems os it is now called Adobe Flash.
Source: http:// www.flashmagazine.com/news/detil/the-flash-history
TYPES OF FILES IN FLASH
There are basically tow types of files in Flash.
The Flash Player file has .swf extension. This file can only be viewed, the user cannot edit it.
SAVING A FLASH FILE
To save a Flash file follow these steps:
1. From the File menu, select Save As.
Sm image
Fig. 4.4a
In the Save As dialog box (Fig. 4.4b):
Image 91
Fig. 4.4b
2. Select the folder to save the file in.
3. Type the name in the File name box.
4. Click on the Save button.
Notice that the file gets saved as flash document file with fla extension.
COOT TIP
Press Ctrl + Shift and S keys to save a Flash file.
OPENING A SAVED FLASH FILE
To open a file saved earlier follow these steps:
1. From the File menu, select Open.
Sm image
Fig. 4.5a
In the Open dialog box (Fig. 4.5b):
Image 92

Fig. 4.5b
2. Select the folder where the file is saved.
3. Select the file to be opened.
4. Click on the Open button.
COOT TIP
Press Ctrl and O keys to open a saved file.
EXIT FLASH
To exit out to Flash follow these steps:
From the File menu, select Exit (fig. 4.6).
Or
Press Ctrl and Q keys.
Sm image
Fig. 4.6
LET US RECALL sm image
Flash is a multimedia program used to create animation and interactive application for the web.
To start Flash, click Start All Programs Macromedia Macromedia Flash 8.
The Stage of the flash document window is the workspace where graphic, text, videos, buttons and so on are
placed for the user to see.
The Timeline tells Flash when graphic and other elements of the project should appear during animations.
The Tools panel is divided into four section-Tools, View, Colors and Options.
The Properties panel displays the properties of the object selected.
The flash document file can be opened and changes can be made to it.
The Flash Player file can only be viewed, the user cannot edit it.
KEYWORDS sm image
FLASH a multimedia program used for creating animation and interactive application of the web
STAGE workspace where graphic, text, videos, buttons and so on are placed for the user to see
TIMELINE tells Flash when graphic and other elements of the project should appear during animation
TEST YOURSELF sm image
A. Fill in the blanks.
1. Instead of file Save As you can press -------------------------- + ------------------------- and S keys.
2. Graphic, text, videos, buttons and so on are placed on ----------------------

3. The Timeline includes -------------------------- of animation.


4. The -------------------------- section of the Tools panel has additional modifiers of the tool selected.
B. Solve the crossword.
Clues:
Across
5. An imitation of movement created by displaying a series of pictures.
6. The Flash -------------------------- file can only be viewed.
7. A section of the Tools panel that allows you to zoom in or out.
8.

The Flash workspace.

Down
1. The file extension of the Flash document file.
2. This panel displays the characteristics of the selected object.
3. It tells Flash when an element should appear during animation.
4. The file type that can be edited.
5. This panel is divided into four sections.
C. Answer these questions.
1. What is Flash and what is it used for?
2. What are the two types of files created in Flash? What is the difference between them?
3. What are the four sections of the Tool panel?
4. Why is Flash useful for creating applications for the web?
IN THE LAB sm image
D. Open a new file in Flash. Experiment with the tools from the Tools panel to draw a figure on the Stage. Save the
file.
E. Open a new Flash document file and do the following.
1. Click on the Pencil Tool icon.
2. Try changing the color by clicking the Stroke Color Tool and select the color from the color swatch.
3. Now draw on the Stage.
4. Save your file in the My Documents folder as firstdrawing.fla.
5. Exit Flash.
Image 93
Teachers notes ------------------------- The teacher can demonstrate how to make more screen space by hiding panels not required.
The teacher should also help the students set the properties of the movie like the size and the frame rate.
CHAPTER 5

Drawing and painting in Flash


IN THIS CHAPTER
We will learn about
the tools
drawing lines
drawing ovals
drawing rectangles
drawing polygons and stars
Paint Fill
the Brush Tool
the paint Bucket tool
the Eraser Tool
an artists tools are his brushes, paints and so on. So if you are going to draw and paint in Flash, you will need tools too.
The tool panel has all the tools you will need.
Let us look closely at these tools.
THE TOOLS
There are four sections in the too panel- tools a for drawing, tools for viewing, tool for colouring and tolls for
modifications.
You are familiar with most of the drawing tools as you have used them to draw in Paint too, but most tools have
additional options.
Arrow

subselection

Free Transform Gradient Transform


Line

Lasso

Pen

Text

Oval

Rectangle

Pencil

Brush

Ink Bottle

Paint Bucket

Eyedropper

Eraser

Hand

Zoom
Stroke Color

Fill color
Tool modifiers
Fig. 5.1
Image 94
Drawing lines
Lines can be drawn using the Line and Pencil tools. The difference is that the Pencil Tool is used to make freehand
drawings like you would do with a real pencil. Drawing line with the Line tool on the other hand is like using a ruler to
draw line.
We can set a line color, line width and a one style for the lines drawn.
To draw a line:
1. Select the Pencil or Line Tool.
When the Pencil or Line Tool is selected, the Property Inspector window opens.
It looks like the one shown if Figure 5.2.
Image 95
2. Click to open the colour swatch.
3. Click the line colour you want.
4. Click to display the line width slider.
5. Move the slider to change the width to line.
6. Click to display the line style.
7. Click the lined style you want.
Fig. 5.2
Sm image
Sm image
Sm image
8. Move the pointer to the Stage.
9. Click and drag to draw a line.
CLICK time
Shruti has been asked to draw the drawing shown alongside, using the pencil and Line tools. Help her with the steps.
Welcome Home

Sm image
Solution:
To write WELCOME HOME:
1. Select the Pencil Tool.
From the Property Inspector window.
Sm image
2. Select the color red.
3. Select the line width10.
4. Select the line style.
5. Move the pointer to the Stage.
6. Click and drag to draw the lines.
To draw the hut:
1. Select the Line Tool.
2. From the Properties Inspector window, select the line width, color and Solid line style.
3. Move the pointer to the Stage.
4. Click and drag to draw the line for the hut.
Drawing ovals
The Oval Tool is used to draw an oval filled with colour.
To draw an oval:
1. Select the Oval Tool.
From the Property Inspector window (Fig. 5.3):
2. Click to select the line colour.
3. Click to select the fill colour.
4. Click to display the line width slider.
5. Click to display the line style
Sm image
Fig. 5.3
6. Move the pointer to the Stage.
7. Click and drag to draw an oval.
Drawing rectangles

The steps to draw a simple rectangle or square are similar as in teh case of drawing ovals.
To draw a rectangle or square:
1. Select the Rectangle Tool.
From the Property Inspector window (Fig. 5.4):
2. Click to select the line colour.
3. Click to select the fill colour.
4. Click to display the line width slider.
5. Click to display the line styles.
Sm image
6. Move the pointer to the Stage.
7. Click and drag to draw the rectangle.
Drawing polygons and stars
The Rectangle Tool allows you to draw polygons and stars too. Let us see how this is done.
1. Click on the arrow on the Rectangle Tool.
2. Select the Polystar Tool from the drop-down menu.
Sm image
Fig. 5.5a
From the property Inspector window.
Sm image
Fig. 5.5b
3. Click on the Option button.
The Tool Settings dialog box appears (Fig. 5.5c). In this:
4. Click and select polygon or star.
5. Enter Number of sides.
6. Enter Star point size.
7. Click on the OK button.
8. Move the pointer to the Stage.
9. Click and drag to draw the shape.
Image 96
Fig. 5.5c

Note: In Flash there is a difference between outlines and fills.


When a line is drawn, there is only the outline and no fill. But when a rectangle or an oval is drawn, there is an outline
and a fill.
CLICK time
How can Naazish draw 6 point stars on the Stage? Help her with the steps.
Solution:
1. Click on the arrow on the Rectangle Tool.
2. Select the PolyStar Tool sm image from the drop-down menu.
3. In the Property Inspector window, click on the Option button.
4. The Tool Settings dialog box appears in it:
Click and select stat from the style list box.
Enter 6 in the Number of Sides box.
Click on the OK button.
5. Move the pointer to the Stage.
6. Click and drag to draw the star shape.
Sm image
Paint Fill
Flash not only allows you to fill solid colures, it also allows a gradient fill of colours.
Clicking on the Fill Colour icon in the Colours section of the Tool opens up the colour palette. To select a gradient
effect, click on one of the inbuilt gradients.
Image 97
Fig. 5.6
Click to select one of the gradients.
There are two tools, Brush and Paint Bucket, which allow us to paint and fill colour into shapes.
The Brush Tool
The Brush Tool is used to paint shapes. When the Brush Tool is selected, the following options are displayed:
Click to display Brush Modes.
Click to display Brush Sizes.
Click to display Brush Shapes.
Sm image

Brush Mode
Sm image
Brush Size
Sm image
Brush Shape
Sm image
The Brush Modes specify how you want to paint the image drawn.
The effect of each of these modes is shown below (fig. 5.7b):

Paint Normal Paints over lines and files


Paint Fills ignores lines by only filling in the inside of shapes and areas.
Paint behind ignores existing shapes and lines and only paints in blank areas of the Stage.
Paint selection Paint a selected area only.
Paint Inside Paints inside the shape or area in which the brush stroke started.
Image 98
Fig. 5.7b
Now you can experiment with the Brush Modes and their effects!
To paint with the Brush Tool:
Select the Brush Tool:
Select the Brush Size, Brush Shape and the Brush Mode.
Select the Fill Colour.
Drag the mouse on the Stage to paint.
CHECK YOUR PROGRESS
Which Brush Mode should be selected to have the following paint effects?
1.

2.

3.

The Paint Bucket Tool


You already know that the Paint Bucket Tool fills enclosed areas with colour. The Paint Bucket also has a feature of
closing any gaps in the objects outline.
(If gaps are too large, they have to be closed manually.)
These options are called Gap Size Modifier (Fig. 5.8).
Sm image
Fig. 5.8
Note: Dont Close Gaps option will not fill an object if its outline contains gaps.
To fill an area with colour:
1. Select the Paint Bucket Tool.
2. Choose a Fill Colour.
3. Select one of the Close options form the Gap Size Modifier.
4. Move the pointer inside the area on the Stage you want to fill and click.
CLICK time
Raju drew a triangle but by mistake left a little gap. How can he fill it with colour using the Paint Bucket Tool?
Solution:
Raju should follow the steps given below:
1. Select the Paint Bucket Tool.
2. Choose a Fill colour
3. Select one of the Close options (Close Small Gaps) from the Gap Size Modifier.
4. Move the pointer inside the triangle and click.
The Eraser Tool
The Eraser Tool helps us to erase line and fills.
Just like in the case of Brush Modes, the Eraser Tool too has many options available in the Eraser Mode Modifier (Fig.
5.9b).
Sm image
Fig. 5.9a
Eraser Mode Modifier

Eraser Shape and Size

Erase Normal Erasers lines and fills.


Erase Fills Erases only fills, lines unaffected.
Erase Lines Erases only lines, fills unaffected.
Erase Selected Fills Erases only selected fills, lines unaffected.
Erase Inside Erases only the fills on which you begin the erasing.
Fig. 5.9b
You can also select an eraser shape and size form the Eraser options:
To erase an area:
Select the Eraser Tool.
Select the Eraser Mode Modifier (Fig. 5.9c).
Select the Eraser Shape and Size.
Move the pointer to the Stage.
Click and drag to erase.
Sm image
Fig. 5.9c
COOT TIP
Double-click on the Eraser Tool to delete everything on the Stage.
DID YOU KNOW?
To select a tool you can press its shortcut or quick key.
To know the quick key for a tool, roll the cursor over the tool.
When you do so the name of the tool with the quick key appears in the ToolTip.-------------------------------------------------------For example, the quick key for the Text Tool is T.

Here is a list of the quick keys for the tools you have learned in this lesson:
Tool

Quick Key

Brush

Eraser

Line

Oval

Paint Fill

Pen

Pencil

Rectangle

Sm image
CLICK time
Sunidhi drew this snowman.
How can she erase the line on the snowmans body?
Also help her to erase the fill colour in the snowmans body.
Sm image
Solution:
To erase the line on the snowmans body.
1. Select the Eraser Tool.
2. Select the Eraser Mode Modifier- Erase Lines.
3. Move the pointer to the Stage, click and drag over the snowmans body to erase the lines.
To erase the fill colour in the snowmans body:
1. Select the Eraser Tool.
2. Select the Eraser Modifier Modifier-Erase Fills.
3. Move the pointer to the Stage, click and drag over the snowmans body to erase the fill colour.
LET US RECALL sm image
Flash has tools to draw and paint on the Stage.
There are four sections in the tool box-tools for drawing, tools for viewing, tools for colouring and tools for
modifications

Line and Pencil tools can be used to draw lines.


KEYWORDS sm image
LINE TOOL

used to draw lines

PENCIL TOOL

used to make freehand drawings

OVAL TOOL

used to draw ovals filled with colour

RECTANGLE TOOL

used to draw rectangle and squares filled with colour

POLYSTAR TOOL

used to draw polygons and stars filled with colour

PAINT BUCKET TOOL

used to fill enclosed areas with colour

BRUSH TOOL

used to paint shapes

ERASER TOOL

used to erase lines and fills

TEST YOURSELF sm image


A. Name the tool used to do the following.
1. Draw a circle.
2. Fill an area with colour on the click of the mouse.
3. Draw a freehand line.
4. Draw a hexagon.
B. Match the following images with the tools used to draw them.
1. TOOL a. sm image
2. TOOL b. sm image
3. TOOL c. Sm image
C. What will be erased in the drawing below, when the following eraser modes are applied?
1. Erase Normal
2. Erase Fills
3. Erase Lines
Sm image
D. Answer these questions.
1. What are the four sections of the tool box?
2. What is the difference between the Line and the Pencil tools?
IN THE LAB sm image
E. Use the Line, Brush and Pencil tools to draw Tool as shown in three ways in Question B.
F.

Use the tools you have learned to draw the following.

1. Sm image
2. Sm image

3. Sm image
PROJECT WORK sm image
G. Use the tools in Flash to create these animal cartoons.
1. Sm image
2. Sm image
WEB LINKS sm image
Learn more about Flash drawing from
http:// echoecho.com/flash.htm
Teachers notes ----------------- The teacher should demonstrate how each tool is used and the various options in each tool.
The difference between the drawing tools common to MS Paint and Flash should be discussed.
TEST PAPER 1
Based on Chapters 1 to 5
Maximum Marks: 50
A. Fill in the blanks.

10

1. The -------------------- tool in Flash in used to draw stars.


2. The -------------------- tells Flash when an element should appear during animation.
3. The Flash ------------------- file can only be viewed, the user cannot edit it.
4. The ----------------------- function returns the smallest or minimum value in the selected range of cells.
5. ----------------------- is a feature that us used to store formatted text, paragraphs or graphics.
6. ----------------------- are equations used to perform calculations in MS Excel.
7. The --------------------- options of the Brush tool in Flash ignores lines by only filling in the inside of shapes and
areas.
8. Header and ------------------------ areas are used to display information like page numbers, date and soon.
9. The ----------------------- feature of NS Excel quickly completes a series of date.
10. The ------------------------- can also be used to clear the contents or a cell or a range of cells.
B. Write

the

formulas

to

be

entered

to

do

the

following

in

MS

Excel.

10
1. If cell A5 has the data Asia Cup 2010, India won should be displayed else Sri Lanka won should be displayed.
2.

The sum of cells B1, D3, E6, E7, E8 to be displayed.

3. The minimum value from D2 to D14 to be displayed.


4. The product of cells F5 and G5 should be subtracted from the quotient of cells A3 and B3.
5. The number of cells containing numeric data in the range A2 to J2 to be displayed.

C. Identify

the

following

and

name

the

application/program

in

which

they

are

used.

8
1. Sm image
2. Sm image
3. Sm image
4. Sm image
D. Using MS Excel write the steps to do the following.

1. Get the days of the week in cells A3 to A9 and the multiples of 4 in B3 to B9 using the Fill Handle?
2. Add a cell border and pattern to the cells.
3. Find the average, maximum and minimum of the numbers in cells B3 to B9.
E. Using MS Word write the steps to do the following.

1. Create an AutoText entry for A journey of a thousand miles starts with a single step named thou.
2. Type the formula:
Area of circle = pai r2
3. Format the background of the document as a picture watermark.
F.

Answer these questions.

10

1. How can important data in a worksheet be highlighted?


2. Write the steps to create a Custom list.
3. How are the AutoText and AutoComplete features of MS Word related?
4. How can you scroll through all the footnotes in a document?
5. What is the difference between the Brush, Pencil and Line tools in Flash?
CHAPTER 6
Language of the Web-HTML
IN THIS CHAPTER
We will learn about
What is HTML?
HTML elements, tags and attributes
Structure of the HTML document
Adding content to a Web page
Creating your first Web page
Viewing the Web page
A Web site is a collation of Web pages. Within the Web site, each screen of information is called a Web page. Pages
may contain text, images, photographs, sound or video.
The beginning page of a Web site is called the home page of the web site.

When you look at a Web page, you might think that it is very difficult to create. But in reality anyone can learn how
to create a Web site.
WHAT IS HTML?
HTML is a language used to write programs to describe Web pages. HTML stands for Hyper Text Mark-up
Language. It defines the structure and layout of a Web page.
HTML Elements, Tags and Attributes
Elements tell the browser how you want your Web site to be presented.
Elements consist of:
A start tag or opening tag
Content
An end tag or closing tag
But what are tags?
HTML uses mark up tags to describe Web pages. Tags are labels used to mark up the beginning and end of an
element. Tags are used to tell the browser what is to be done to the content.
Tags begin with a less than sign < and end with a greater than sign >.
Generally, there are two types of tags-start tag or opening tag and end tag or closing tag.
The end tag has a forward slash / after the less than sign.
For example, <head> is the start tag and </head> the corresponding and tag.
Example of an HTML element is given below:
<b> I am trying to make this text bold. </b>
Start tag

Content

end tag

In the example above, the start tag <b> tells the browser that whatever follows it should be written in bold. And the
end tag </b> indicates that the browser should stop writing text in bold.
Elements that have a start tag and an end tag are called container elements.
But there are exceptions. There are a few elements which have only the start tag and do not require an end tag. These
are called empty elements.
Empty elements are closed in the start tag itself.
For example, <br/> and <hr/> are examples of empty elements.

An attribute defines a property for an element. It gives us some more information about the element like height,
width, colour and so on. Each attribute has to be assigned a value.
Attributes are always written in the start tag.
Example: <font face=schoolboy color=blue> this is good! </font>
Face and color are the attributes of font.
Each attribute has value like face has the value schoolboy and color ahs the value blue.
Notice that the value of the attribute is in quotes.
CLICK time
Look at the code below and identify the tags and attributes. List the container and empty elements.

<html>
<head>
<title> HOBBIES <title>
</head>
<body bgcolor = yellow>
Ny mane is Manan.
<br/> This is a list of my hobbies:
<ul>
<li>Swimming<li>
<li>Painting>/li>
<li>Reading</li>
</ul>
,/body> </html>
Solution:
</html>
1. The tags are:
<html>, </html>, <head>, <head>,<title>, <title>, <body>, </body>,<br/>, <ul>, </ul>, <li>, </li>
2. The body tag has the attribute bgcolor.
3. Container elements are: html, head, title, body, ul and li
4. The empty element is br.

Structure of the HTML document


Web pages constructed using HTML have a basic structure.
The HTML document always begins with the <html> tag and always ends with </html>.
<html> tells the browser that it is an HTML document.
All HTML content is enclosed within <html> . . . </html> tags.
An HTML document contains two parts-the head and the body.
The head section is used for text and tags that do not show directly on the screen.
It contains information about the document.
The <head> . . . </head> tags are used for defining the head section of the document.
The <title> . . . </title> tags age placed within the head element to title the page. The content of the title element is
displayed in the title bar of the browser window.
The body is used for text and tags that are visible in the browser.
The <body> . . . </body> tags are used to define the body content of the document.
Various tags are allowed within the body to indicate headings, paragraphs, lists, links, images and so on.
The HTML document looks like this:

<html>
<head>
<title>
</title>
</head>
<body>
</body>
</html>
Example:

<html>
<head>
<title> A sample web page page </titl>
</head>

Image 99
Fig. 6.1
ADDING CONTENT TO A WEB PAGE
Any content that you want to display on the Web page should be written in the body element.
For example, Kavita wants her name to appear on the pages; she will write the code as:

<html>
<head>
<title> My name </title>
</head>
<body>
My name is Kavita Iyengar.
</body>
Image
100
</html>
Fig. 6.2
CLICK time
Samar created the following HTML document. Correct the errors.

<html>
<head>
<body>
<title> Sports Day </title>
Today was our Sports Day. We enjoyed watching the drill display.
</body>
</head>

Solution:
The errors made by Samar are:
1. The title element is a part of the head section.
2. The head tag should be closed before the body element begins.
Therefore, the corrected code is:

<html>
<head>
<title> Sports Day </title>
</head>
<body>
Today was our Sports Day. We enjoyed watching the drill display.
</body>
</html>
CHECK YOUR PROGRESS
Ravi wrote this HTML code:

<html>
<head>
<title> Welcomed! </title>
</head>
<body>
Welcome back to school. Hope you had a pleasant vacation!
</body>
</html>
What will appear in the blanks shown in the Web page below?
Image 101

CREATING YOUR FIRST WEB PAGE


Now that you have learned a bit about the structure of an HTML. Document, tags and elements, let us try and write the
cone to create a simple page.
You can create HTML documents in a text editor like Notepad.
1. Start Notepad. To start Notepad:
Select Start from the Taskbar.
Click All Programs accessories Notepad (Fig. 6.3a).
Image 102
Fig. 6.3a
2. Now type this sample HTML code in the Notepad window:

<html>
<head>
<title> A sample web page </title>
</head>
<body>
I am learnin HTML and this is my first
web page.
</body>
Image 103
</html>

Fig.6.3b
3. Save the file by choosing Save As from the File menu.
When an HTML document is saved, it is saved with either .htm or html extension.
Image 104
Fig. 6.3c
4. Type the file name ending with .html or .htm extension.
5. Click on the Save button.
VIEWING THE WEB PAGE

And how do you see your Web page? Using a Web browser oif course!
To view the Web page, you will need browser like the Internet Explorer or Mozilla Firefox and so on.
1. Open a Web browser like the Internet Explorer.
2. From the File menu, select Open.
Image 105
Fig. 6.4a
Sm image
LET US RECALL sm image
HTML is a language used to write programs to describe Web pages.
Elements tell the browser how the Web site should be presented.
An element consists of an opening tag, content and a closing tag.
Tags are labels that tell the browser what is to be done to the element content.
Attributes give more information about the element.
The HTML document is divided into the head and body sections.
The HTML code is contained in the HTML element.
The head element has the text and tags that do not show directly on the screen.
It has the title of the page.
The body element contains test and that are visible in the in the browser.
HTML code is written using a text editor like Notepad and viewed using a browser.
KEYWORDS

sm image

WEB SITE

a collection of Web pages

WEB PAGE

each screen of information within the Web site

HOME PAGE

the beginning page of a Web site

HTML

HyperText Markup Language

TAG

A label that tells the browser what is to

ATTRIBUTE

gives more information about the element

CONTAINER ELEMENTS

be done to the element content

Elements that have a start tag and an end tag

EMPTY ELEMENTS

elements that have only the start tag

HTML ELEMENT

tells the browser that it is an HTML document

HEAD ELEMENT

Contains text and tags that do not show directly on the screen

BODY ELEMENT

Contains text and tags that are visible in the browser

TITLE ELEMENT

Defines the title of the Web page

TEST YOURSELF
A. Fill in the blanks.
1. The beginning page of Web site is called a ---------------------2. --------------------- are labels used to mark up the beginning and end of an element.
3. Attributes are always written in the elements ---------------------- tag.
4. The -------------------------- section of Web page is used for text and tags that do not show directly on the page.
5. The head tag appears -------------------------- the body tag.
B.

Stare whether the following statements are True or False.

Rewrite the false statements correctly.

1. All Notepad files are saved with .html extension.


2. The head element is a part of the HTML element.
3. The title element content appears in the title bar of the browser.
4. Elements tell the browser how the Web site should be presented.
5. An attribute need not be assigned a value.
C. Look at the element below.
<img src=blue hill.jpg height=50% width=50% > this is beautiful picture
1. Name tow attributes of the img tag.
2. What is the value assigned to src?
3. What is the content of the element?
4. What kind of element is this-container or empty?
D. Answer these questions.
1. What is HTML?
2. What are the two parts of an HTML document? Explain.
3. Which software do you use to write HTML code and to view the Web page?
4. What is a container element? Give an example.
IN THE LAB sm image
E. Write the HTML code to create a Web page with the title About me. Write a few lines about yourself and
your hobbies.
Open the document with the Web browser and check it out.
F.

Write the HTML code to create a Web page for your mother with the following:

1. Title Chocolate Cake.


2. The body element should have the following text with a line separating the ingredients from the method.
Ingredients
2 tablespoons cocoa powder

1 cup plain flour (maida)


1 teaspoon baking powder
teaspoon sodium bicarbonate
1.2 can (400 grams for full can) condensed milk)
cup melted butter
1 teaspoon vanilla essence
Method
2 tablespoons cocoa powder
Mix the cocoa powder, flour, baking powder and sodium bicarbonate.
Combine all the ingredients together with 1.2 cup (100ml) of water in a bowl and mix well using a whisk.
Pour this mixture into a greased 150 mm (6) diameter baking tin.
Bake in a per-heated oven at 180 C (around 360 F) for 20 minutes or till a knife inserted into the cake comes
out clean.
Unmould and cool on a wire rack
Cut into 1 squares and serve.
Note: before you start a new line, put the <br/> tag.
To get a horizontal line, type the <hr/> tag.
PROJECT WORK sm image
G. Use

the

code

given

on

Page

85

) to create a Web page with a scrolling title Sea beaches. The body of the page should have information
about beaches.
Image 106
WEB LINKS sm image
You can get some interesting HTML codes from
http://hackpc.com/cool-html-codes/
Teachers notes ----------------------- The teacher should help the students understand the benefit of using proper indentation while writing
code.
The teacher can demonstrate how the HTML source code behind any Web page can be viewed.
CHAPTER 7
Computer software and languages
IN THIS CHAPTER

We will learn about


Types of software

Programming languages

Low level languages


High level languages
You have already learned that hardware refers to the physical components of a computer system. The hardware of
any computer system cannot operate on its own. In order to do any task, the computer has to be given a sequence
of instructions. This set of instructions is called a computer program.
Software refers to a set of computer programs software is used to solve user problems and to control operations of
the computer.
Software and hardware are complementary to each other. Both have to work together to produce a result.
TYPES OF SOFTWARE
TYPES OF SOFTWARE
System Software

Application Software

Operating System

Utility Software

Language Processor

Compiler

Interpreter

Assembler

Image 107
Fig. 7.1
The two basic types of software are:
1. Application software: Application software is a set of programs that is designed to handle a specific task. It is
software that allows us to do things like create documents, play games listen to music and so on.
Word processing software, accounting software, spreadsheet software, graphics software, browser software, air
traffic control software and so on are all examples of application software.
2. System software: System software manages and controls computer hardware so that application software can
perform a task. It also allows us to work with the computer. System software can be further divided into
operation system software, utility software and language processors.
DID YOU KNOW? Sm image
Ada Lovelace is recognized as the first computer programmer. She devised a method to calculate Bernoulli
numbers using the Analytical Engine designed by Charles Babbage in the late 19th century.
A computer language Ada was named after her in the late 1970s.

High level languages


Both machine and assembly languages are machine dependent. A programmer needs complete knowledge of the
hardware to be able to write programs using a low level language.
Therefore, programmers generally use high level languages to writhe programs. These languages are called high
level languages as they are closer to human languages. High level languages are simple to understand that use
English words for writing instructions.

You have learned how to QBASIC and LOGO. Other examples of high level languages are C++, COBOL, JAVA
and so on.
A compiler or interpreter converts high level language instructions to machine language for the computer to
understand.
CHECK YOUR PROGRESS
Correct the following statements.
1. Assembly language is directly understood by the computer.
2. The two types of low level languages are compiler and interpreter.
3. High level languages are used to convert an assembly language program to machine language line by line.
4. COBOL is an example of assembly language.
LET US RECALL sm image
Hardware and software are complementary to each other. Software is basically of two types-application
software and system software.
Application software is designed to handle a specific task whereas system software manages and controls
computer hardware.
System software is of three types-operating system software, utility software and language processors.
Programming languages are of two types-low level and high level.
Low level languages are machine dependent. These are difficult to learn and write programs in.
High level languages are used to write programs. They are simple and easy to understand.
KEYWORDS sm image
PROGRAM

A set of instructions given to the computer to complete a task

SOFTWARE A set of programs used to solve users problems and control operations of the computer
APPLICATION SOFTWARE A set of programs designed to handle a specific task
SYSTEM SOFTWARE A set of programs that helps in running the computer hardware and the devices attached
to it

OPERATING SYSTEM SOFTWARE Software designed to run other programs on a computer


UTILITY A program that helps to manage, maintain and control computer resources
LANGUAGE PROCESSOR language translation software
COMPILER

A program that translates high level language program code to machine language and vice versa all

at once
INTERPRETER A program that converts simple commands written in an assembly language into machine code
line by line
ASSEMBLER A program that converts simple commands written is an assembly language onto machine code
and executes it
LOW LEVEL LANGUAGE machine oriented language that is closest to the way a computer is built
MACHINE LANGUAGE the only language that is directly understood by the computer with instructions written
as strings of 1s (ones) and Os (zeros)
ASSEMBLY LANGUAGE Language where the instruction are written as mnemonic codes
HIGH LEVEL LANGUAGE

Language where English words are used for writing instructions.

TEST YOURSELF sm image


A. Fill in the blanks.
1. Both ----------------------- and ----------------------- language are machine dependent.
2. ------------------------ is used to solve user problems and to control operations of the computer.
3. ------------------------- language is the only language that is directly understood by the computer.
4. An --------------------- is the most important software on a computer.
5. ------------------------- is a language translation software.
B. State whether the following statements are True of False. Rewrite the false statements correctly.
1. The set of instructions given to the computer is called a program.
2. UNIX is an application software.
3. Assembly language is the only language that is indirectly understood by the computer.
4. A compiler converts high level language instructions to machine language.
5. An anti-virus software is a utility program.
C. Match the columns.
Column A

Column B

1. 11000100

a. Application software

2. JAVA

b. Assembly language instruction

3. DOS

c. High level language

4. NOTEPAD

d. Operating system

5. mov m, a1

e. Machine language instruction

D.

Answer these questions.

1. What is a software? Why is it required?


2. What are the adventages and disadvantages of writing programs in machine language?
3. What is utility software? Give examples.
4. Write a short note on operating system.
IN THE LAB sm image
E. Make a presentation on Types of Software used on my school in PowerPoint. Investigate and find out the
application and system software used in your school and categorize them as operation system, utility software
and language processor.
Image 108
WEB LINKS sm image
To learn more about computers languages check this web link:
http//hubpages.com/hub/Types-of-Computer-Languages-with-Advantages-and-Disadvantage
Teachers notes ------------- The teacher can ask the students the names of software they are familiar with. The class can then be asked
to categorize these software.
The students can be made aware that even system software is written using various high level languages.
The can then be asked to find out the high level languages

used to write Window, Linux and Unix.

CHAPTER 8
Your computer under attack!
IN THIS CHAPTER
We will learn about
What is a computer virus?
How does a virus spread?
Types of computer viruses
Other harmful programs
How to safeguard your computer
Kavitas computer is really sick. It is not working properly and her father says it has a virus. Not chicken pox or swine
flu, it has got a computer virus!
There are many harmful and malicious programs written by people that may cause irreparable damage to data store on
computers across the world.

Computer viruses, worms and Trojan Horse are some of these harmful programs
WHAT IS A COMPUTER VIRUS?
A computer virus is a program code written to deliberately enter a computer without the users permission or
knowledge. The virus attaches itself to other programs and each time the program runs, the virus reproduces by
infecting other programs in the computer system. Just like a biological virus spreads from one person to another, a
computer virus spreads from one computer to another.
Some computer viruses may be harmless and don nothing more than display a funny message while others may cause
severe harm to the computer system like deleting files on the hard disk. But a computer virus can affect software only
and not the hardware.
HOW DOES A VIRUS SPREAD?
A computer virus cannot spread without human action. This may sound strange but it is true. When the file that
contains the virus is opened, or executed then the virus is activated. The active virus loads itself into the memory of a
computer and looks to see if it can find any other programs to infect. If the virus finds a program, it modifies the code
and attaches itself to the new program.
So, we spread computer viruses unknowingly by:
Haring infected files saved on floppies or CDs.
Opening infected e-mail attachments.
Downloading infected files from the Internet.
TYPES OF COMPUTER VIRUSES
Computer viruses can be categorized according to the types of files they infect or the kind of damage they may cause
to the computer system.
Some viruses that can infect a computer system are discussed here.
Boot sector virus
Boot sector viruses hide in the boot sector of either the floppy disk or the hard disk. These viruses have become rare
these days as floppy disks are not commonly used. Examples of boot sector viruses are Disk Killer, Michelangelo,
Polyboot B and AntiEXE.
Macro virus
A macro is an instruction that carries out commands automatically. Applications like Microsoft Excel, and PowerPoint
make use of macros. When a document infected with a micro virus is opened using one of these applications, the
application itself becomes infected. Any document on that machine that used the same application can then become
infected. Examples of macro viruses are Telex, Melissa. A, Bablas and Word Concept.
E-mail virus

As the name suggests, these viruses spread through e-mail attachments. Once and infected attachment is opened, the
virus infects the computer system. Some of these viruses actually replicate themselves by automatically e-mailing
everyone in your e-mail address book.
Polymorphic virus
A polymorphic virus cnanges its code every time it infects a new file. So, a polymorphic virus may have hundreds of
different forms. This makes it extremely difficult for an antivirus software to detect it. examples of polymorphic
viruses are Elkern, Marburg, Satam Bug and Tuareg.
File infectors
A file infector virus infects programs or executable files (Files with an .EXE or .COM extension). When and infected
program is run, the virus becomes active and infects other executable programs on the computer. This is the most
common type of virus that infects computer systems. Examples of file infectors are Cascade and Sunday.
CHECK YOUR PROGRESS
Which of the following are valid statements?
1. A computer virus can spread without human action.
2. Boot sector viruses have become rare these days.
3. A polymorphic virus infects e-mail attachments.
OTHER HARMFUL PROGRAMS
Worms
A computer worm is a program that is capable of copying itself from one computer to another. It is different form
a virus because it is capable of running itself and does not need a host program to run like the virus.
Trojan Horse
Another nasty program is a Trojan Horse. A Trojan Horse pretends to be a beneficial program at first glance but
actually damages the computer once it is run.
One of the most dangerous types of Trojan Horse is a program tha pretends to clean up viruses from your
computer but actually introduces viruses into your computer.
Trojans do not reproduce by infecting other files like viruses nor do they self-replicate like worms. Examples of
Trojan Horse are Acid Rain, Crack, Executor and Orchid.
DID YOU KNOW?
Youngsters have always been interested in computers! This is Rechard Skrenta who wrote a program called Elk
Cloner in 1982.
Elk Cloner was a virus that spread to many computers and was responsible for the first computer virus outbreak.

He wrote the virus code as a prank when he was only 15 years ole.
The virus was activated on the 50th time of starting the computer.
The virus would display this poem:
Elk Cloner: The program with a personality
It will get on all your disks
It will infiltrate your chips
Yes its Cloner!
It will stick to you like glue
It will modify ram too
Send in the Cloner!
Source: http//searchsecurity.techtarget.com
CHECK YOUR PROGRESS
Unscramble the following words.
1. SMOWR
2. VNARTULLS
3. CROMA
4. JARONT SHORE
HOW TO SAFEGUARD YOUR COMPUTER
Prevention is better than cure. It is better to safeguard your computer against any attack from malicious software.
The first thing you must do is install a good anti-virus software on your computer. This type of software
can detect and block viruses. An anti-virus program scans all the disks for viruses, and if it finds any
viruses, it can quarantine them and delete them. It is important to update the anti-virus and so on.
Use floppies and CDs that are from a source known to you. Better still, scan the removable disks with an
anti-virus before your start using them.
Never open an e-mail from an unknown person. Be careful while opening attachments with extensions
.exe and .com.
Do not download files form insecure sites.
Follow these steps (Fig. 8.1a & b) to increase the security level of your computer and restrict the entry of
viruses form the Internet:
Image 109
Fig. 8.1a

1. In the Internet Explorer window, form the Tools menu, select Internet Options.
Image 110
Fig. 8.1b
2. Click on the Security tab.
3. Set Security level to High on the slider.
4. Click on Apply can then on the OK button.
LET US RECALL sm image
A computer virus is a program code written to deliberately enter a computer without the users permission or
knowledge.
Viruses may spread by sharing infected files saved on floppies or CDs, opening infected e-mail attachment or
downloading infected files from the internet.
Boot sector virus, macro virus, e-mail virus, polymorphic virus and file infector virus are some types of
viruses.
Worms and Trojan Horse are program that harm the computer.
An anti-virus software should be used to detect and block viruses.
KEYWORDS sm image
COMPUTER VIRUS

a program code written to deliberately enter a computer without the users permission

or knowledge
BOOT SECTOR VIRUS a virus the hides in the boot sector of the floppy disk or the hard disk
MACRO

an instruction the carries out commands automatically

POLYMORPHIC VIRUS a virus that changes its code very time it infects new file
FILE INFECTOR VIRUS a virus that infects programs or executable files
COMPUTER WORM

a program that is capable of copying itself from one computer to another

TROJAN HORSE

a program that pretends to be a beneficial program but actually damages the computer

once it s run
TEST YOURSELF sm image
A. Fill in the blanks.
1. A -------------------------- is an instruction that carries out commands automatically.
2. A virus needs a ----------------------- program to spread.
3. A computer virus cannot spread without a -------------------------4. A ------------------------ virus infects programs or executable files.
5. The ---------------------------- pretends to be a beneficial program.
B. State whether the following statements are True or False. Rewrite the false statements correctly.

1. A computer virus harms the hardware as well as the software.


2. Boot sector viruses hide in the boot sector of the disk.
3. Worm is a type of virus.
4. All computer viruses are harmful.
5. A file infector virus is the most common type of virus.
Sm image
C. Say whether the following are viruses, worms, Trojan Horse or anti-virus programs.
1. Disk Killer
2. AVG
3. Cascade
4. Conficker
5. Tuareg
6. Executor
D. Answer these questions.
1. How is a computer virus similar to a biological virus?
2. How does a virus spread from one computer to the other?
3. Why is the polymorphic virus difficult to detect?
4. What is the difference between a virus, a worm and a Trojan Horse?
5. A worm can be very destructive. Give an example.
6. Suggest three ways in which we can prevent out computer getting infected with a virus.
IN THE LAB sm image
E. Check your computer system to see if there is an anti-virus program installed. If a program is installed, run it
and scan your computer for viruses.
WEB LINKS sm image
If an anti-virus program is not installed, you can download free trial versions of AVG anti-virus and Avira form
the follow websites:
http://free.avg.com/download-avg-anti-virus-free-edition
http://www.free-av.com/
Teachers notes ------------------------- The teacher can discuss the similarities between a biological and a computer virus.
The teacher can demonstrate how to use an anti-virus software to scan the computer system.
CHAPTER 9
More on QBASIC
IN THIS CHAPTER

We will learn about


The INPUT statement
Checking conditions
Logical operators
Looping
You have learned how to assign values to variable using the LET statement. But what if you want to write a
program that allows the user to enter the values at runtime (when the program is executed)?
THE INPUT STATEMENT
The Input statement can be used to assign valued to variable at runtime.
The INPUT statement allows the user to assign values to variables during program execution. This means that
each time the program is executed, a new set of information can be entered.
The syntax for the INPUT statement is written as:
INPUTE <prompt>; variable
The prompt informs the user about what about what he is expected to enter.
Example:
INPUT Please enter your age; a
Prompt

Variable

When the INPUT statement is executed, the computer does four things:
1. It stops further execution of the program.
2. It prints the prompt message along with a question mark.
3. It waits for the user to enter some date.
4. It assigns the data entered to the variables named in the INPUT statement.
In the Example given above, whey you execute (run) the statement, the screen displays the message and waits
for the user to enter the information. For example, if the user enters 8, the value 8 is assigned to the variable
a.
Image 111
Fig. 9.1a
Note: Every time the above program is executed, a different age can be entered.
What will happen if the user enters the age as eight?
The computer displays the error message Redo from start.

Image 112
Fig. 9.1b
The reason is that the user has entered a string value whereas the computer is expecting a numeric value to be
stored in the variable a.
Example: The following program asks the user to enter two numbers, adds them and prints out the sum.
CLS
INPUT ENTER FIRST NUMBER; NUM1

This tells the computer to expect a number

INPUT ENTER SECOND NUMBER; NUM2


SUM = NUM1 +NUM2
PRINT THE SUM OF THE TWO NUMBERS IS ; SUM
END
Suppose 34 and 87 are the two numbers entered in response to the two INPUT statements.
Whey the program is executed, the computer display is shown if Figure 9.1c
Image 113
Fig. 9.1c
CLICK time
Unnati has been asked by her teacher to write a program to print out the date in dd/mm/yyyy format after the
user enters the day, month and year. Help her with the steps.
Solution:
1. INPUT Enter a year (yyyy); year
2. INPUT Enter a day (dd); day
3. INPUT Enter a month (mm); month
4. CLS
5.

PRINT The date is; day; /; month; /; year

6. END
Sm image
CHECKING CONDITIONS
Rajs mother said to him, If you complete your work then Ill buy you the toy you wanted.
Now, the decision was up to Raj. He had to fulfil the condition of completing his work to get the toy.

In many programs, decisions have to be made based on a condition.


This is done with the IF ... THEN ... ELSE statement.
The IF ... THEN ... ELSE is a decision-making statement. It checks a given condition and chooses between the
options given.
The syntax for the IF ... THEN ... ELSE statement is written as:
IF <condition>

THEN <instruction1>

ELSE <instruction2>

Relational operators are used to form the condition.


If the condition is true, instruction 1 is executed.
If the condition is false, instruction 2 is executed.
The ELSE part of the statement is optional.
Example: INPUT what does the Q in QBASIC stand for; Ans$
IF Ans$ = Quick THEN PRINT Excellent answer ELSE PRINT Wrong!
In this Example,
Ans$ = Quick is the condition.
Excellent answer will be printed only if the user enters the value Quick
For all other answers Wrong will be printed.
What if someone enters quick or QUICK?
In these cases Wrong will be displayed as in QBASIC, Quick is not the same as quick or QUICK.
Sometimes you may want QBASIC to executed more than tow or three commands if the condition is true. Is
such cases the IF ... THEN ... ELSE ... ENDIF block is used.
Example: INPUT Do you want the answers (Yes / No); a$
IF a$ = Yes THEN
PRINT The name of the President of India is Mrs Pratibha Patil
PRINT The mane of the Prime Minister of India is Dr Manmohan Singh
ELS
PRINT You have chosen No
END IF
These two PRINT commands will be executed if the condition is True

CLICK time
Your teacher has told you to design a quiz program where the user scores 10 point on every correct answer.
The final score should also be displayed at the end of the program.
Write the program.
Solution:
CLS
Score = 0
INPUT How many days are there in a week; d
If d =7 THEN
PRINT Right answer!
Score = score + 10
ELSE
PRINT Wrong answer, there are 7 days in a week!
ENDIF
REN-second question
INPUT How many months are there is year; y
IF Y = 12 THEN
PRINT Right answer!
Score = score + 10
ELSE
PRINT Wrong answer, there are 12 months in year!
ENDIF
PRINT Your score is ; score
PRINT Thanks for playing.
END
Sm image
LOGICAL OPERATORS

Sometimes you need to check two or more conditions in an IF statement. You must then combine the
conditions using logical operators like AND or OR.
The AND operator
When AND is used to combine conditions, the computer executes the statements after THEN, only if all the
conditions are satisfied or True.
Example: REM : Program that tell the user if they are allowed to vote or not
INPUT Please enter your Nationality; N$
IF A>18 AND N$ = Indian THEN
PRINT You are allowed to vote
ELSE
PRINT You are not allowed to vote
ENDIF
END
If someone enters his age as 18 (or more) and his Nationality as Indian, the computer will print You are
allowed to vote.
Let us see what will be displayed if the following values are entered:
A

N$

Condition 1

Condition 2

Result

14

American

False

False

You are not allowed to vote

10

Indian

True

False

You are not allowed to vote

18

American

True

False

You are not allowed to vote

25

Indian

True

True

You are allowed to vote

Hence, only when both the condition are True, will the instruction after THEN be executed.
The OR operator
When OR is used to combine conditions, the computer executes the statements after THEN, even if only one
condition is True.
Example: In the previous Example, if the IF statement was
IF A>=18 OR N$ = Indian THEN
PRINT You are allowed to vote
ELSE

PRINT You are not allowed to vote


ENDIF
The computer will print You are allowed to vote in any one of the following situations:
Age is 18 (or more) and Nationality could be anything.
Age could be any value and Nationality is Indian.
Age is 18 (or more) and nationality is Indian.
The computer will print You are not allowed to vote only when age is less than 18 and Nationality is not
Indian.
In case of OR, let us see what will be displayed if the following values are entered:
A

N$

Condition 1

Condition 2

Result

14

American

False

False

You are not allowed to vote

10

Indian

False

True

You are allowed to vote

18

American

True

False

You are allowed to vote

25

Indian

True

True

You are allowed to vote

So, the instruction after ELSE will be executed only when all the conditions are False.
DID YOU KNOW?
Relational operators are used for comparing date. They can be used to compare both numeric as well as string
data. A list of relational operators is given below:
Greater than

>

Less than

<

Equal to

Greater than or equal to

>=

Less than or equal to

<=

Not equal to

<>or >>

CHECK YOUR PROGRESS


Read the following program carefully.
CLS
INPUT What is your first name; F$
INPUT What is your last name ; L$
If F$ = JULIUS AND L$ = CAESAR THEN

PRINT You are the one I am looking for


ELSE
PRINT Your are a stranger
ENDIF
What will be the result if the following values are entered in response to the INPUT statements?
F$

L$

JULIUS

HOWARD

JULIUS

CAESAR

ROBERT

CAESAR

ROBERT

DOWNING

Result

LOOPING
A loop makes the computer do something, like display a message, over and over again.
When QBASIC repeats a part of a program over and over again, it is called looping.
It is essential to control loops or the computer goes berserk and the statements will be repeated forever.
Loops are controlled by a condition. The statements in the loop are executed only if the condition is True. A loop is
rather like a race where the runner has to go round the track several times. Each time the computer carries out the
instructions in the loop, it is like completing one lap of the race.
The FOR . . . NEXT and WHILE . . . WEND statements can be used for looping.
WHILE . . . WEND
The WHILE . . . WEND statement is used for looping. These statements continue the loop until the given condition is
True.
The syntax for the WHILE . . . WEND statement is written as:
WHILE <condition>
...
...
. . . (statements)
...
WEND

Example: The program below prints HELLO four times.


CLS
C = 1 ----------------- C is the loop variable that keeps count of the number of times the loop is repeated. Its initial
value is 1.
WHILE C < 5 --------------------------- C < 5 is the condition that controls the loop.
PRINT HELLO
C = C + 1 ------------------------- The value of C increased by 1.
WEND ------------------- The WEND statement loops back to the WHILE statement.
END
In this program, the computer uses C to keep count of how many times the loop has been executed.
In the beginning, the value of C is 1. Each time the computer goes around the loop, the value of C is increased by 1.
The statements between WHILE and WEND are executed till C is less than 5.
When C equals 5, the loop is exited and the statements following WEND are executed.
So, the output of the program will be:
Image 114
Fig. 9.2
Note:
The loop variable should be assigned an initial value before the loop starts.
The loop variable must be increased / decreased within the loop.
Example:
CLS
C=1
WHILE C <=10
PRINT C
WEND
END
In the program above, the control variable is not increased or decreased.

What do you think will the output of this program be?


The value of C will remain 1 as it is not being increased or decreased. Therefore, the loop will be executed
continuously.
COOL TIP
If the loop is executed continuously, you can break the infinite loop by pressing the CTRL and Pause Break keys.
Sm image
CHECK YOUR PROGRESS
Fill in the blanks so that the following program prints out numbers from 15 to 30.
CLS
------------- = 15
WHILE X -------------------- 30
PRINT X
X = ------------WEND
END
FOR . . . TO . . . NEXT
These sets of looping statements execute a part of the program a certain number of times.
The syntax for the FOR . . . TO . . . NEXT statement is written as:
FOR <variable> = initial value TO fanal value STEP increment/decrement
...
. . . Statement to be repeated
...
NEXT <variable>
Variable is the loop variable that keeps count of the number of times the loop has been executed. It must be a numeric
variable.
Initial value is the first value assigned to the variable.
Final value is the last value the variable can have.

STEP gives the value by which the variable should be increased or decreased. If the STEP is not given, by default the
value of the variable is increased by 1. If the initial value is greater than the final value, STEP will be a negative
number.
The NEXT statement returns the control of the program to the FOR statement.
How does the FOR . . . TO . . . NEXT loop work?
When execution of the FOR . . . TO . . . NEXT loop begins, the loop variable is assigned the start value.
Before the statement is the loop are executed, the loop variable is compared to the final value.
If variable is less than the final value, the statements is the loop are executed.
If variable is greater than the final value, the FOR loop terminates and control passes to the statements following the
NEXT statement.
The NEXT statement increments the loop variable by STEP and returns to the FOR statement. And the process
continues until the variable value exceeds the final value.
Example: FOR C = 1 TO 4
PRINT Hello
NEXT C
END
In this loop program:
C is the loop variable the keep count of the times the loop is repeated.

1 is the initial value is give, it is taken to be 1. This means the value of C is increased by 1 each time the computer
goes round the loop until it reaches 4.
When C equals 5 (greater than 4), the control exits the loop to the statement following NEXT.
The output of the program given above will be:
Image 115
Fig. 9.3
The statement SUM = SUM + NUM tells the computer to add NUM to the previous value of SUM.
If SUM was 20 and NUM IS 30, THE new value of SUM will be 50.
COOL TIP
A loop with no instructions inside it makes the computer pause for a moment. It is called a delay loop.
Example: CLS
PRINT HELLO EVERYONE
FOR K = 1 TO 2000

NEXT K
PRINT HELLO AGAIN
END
After printing HELLO EVERYONE, the computer pauses for a while before printing HELLO AGAIN
CLICK time
Ravinders grandfather wants to rewrite the following program using the FOR . . . TO . . . NEXT statements instead of
WHILE . . . WEND. Help him write the program.
CLS
C=5
WHILE C <= 50
PRINT C
C = C+5
WEND END
Sm image
Solution:
The program can be rewritten as shown below:
CLS
FOR C = 5 TO 50 STEP-5
PRINT C
NEXT C
END
The statement FOR C = 5 TO 50 STEP-5 replaces the following statements in the WHILE . . . WEND program:
. . . WEND program:
C=5
WHILE C <= 50
C = C+5
LET US RECALL sm image

The INPUT statement is used to allow data entry during program execution to make program interactive.
The IF . . . THEN . . . ELSE statement is used to check conditions and make decisions.
Relational operators are used to compare data in the IF statement.
Logical operators AND and OR are used to combine two or more conditions in the IF statement.
Looping is used to repeat a part of the program.
WHILE . . . WEND and FOR . . . TO . . . NEXT statement are used to construct loops.
KEYWORDS sm image
INPUT statement used to allow data entry during program execution
IF . . . THEN . . . ELSE a decision making statement.
RELATIONAL OPERATORS operators used for comparing data
LOGICLA OPERATORS words used to combine conditions in the IF statement.
LOOP

a program structure that makes the computer repeat a part of the program

WHILE . . . WEND a set of looping statements that continue a loop until a specified condition is true.
FOR . . . TO . . . NEXT a set of looping statements that execute a part of the program a certain number of times.
TEST YOURSELF sm image
A. Fill in the blanks.
1. Loops are controlled by a -------------------------2. An infinite loop can be stopped by pressing the ----------------- and ---------------------- keys.
3. ------------------------------ gives the value by which the loop variable should be increased or decreased.
4. When the ------------------------- statement is executed, it stops further execution to the program.
5. The ------------------------ statement separates the IF . . . THEN block from the rest of the program.
B. What will be the output of the following programs?
1. FOR X = 1 TO 5
PRINT X * X
NEXT X
2. FOR C = 1 TO 10
INPUT Name; NA$
INPUT Age; AG
IF AG > 18 THEN
PRINT You can come in; NA$
ELSE

PRINT Please go home!


ENDIF
NEXT C
3. Give the output if the following values are entered for program in question 2.

Name Suresh, Age 54


Name Dipali, Age 12
Name Shalini, Age 18
C. Debug (find the errors) in programs.
1. FOR Y = 1 TO 10 STEP 2
PRINT I AM LOOPING!
NEXT X
2. B$ = 1
WHILE B$ >= 10
INPUT Enter your phone number; PHNUM
B$ = 1
WEND
D. Answer these questions.
1. How is the INPUT statement different from the LET statement?
2. What happens when the computer encounters an INPUT statement?
3. State the difference between logical operators AND and OR.
4. What is a delay loop? What is the purpose of using a delay loop?
IN THE LAB sm image
1. Write a program to print out Chak De India 10 times using FOR . . . NEXT.
2. Chandu wants to print out all the even numbers between 101 and 200 in the descending order.
Help him write a WHILE . . . WEN loop to do this exercise.
3. Let Priya input a number and print out if the number entered is positive or negative.
4. Write a program where Rajesh is allowed to input tow numbers and their choice of operation (add, subtract, multiply
or divide). Print the result depending on Rajess choice.

5. Write a program to calculate the total marks and the percentage of marks of your friend after asking for his marks in
all the subjects. Print out the grade according to the following marking scheme for total marks:
A+ marks >= 90
A

80 <= marks < 90 (Hint: marks >= 80 and marks < 90)

B+ 70 <= marks < 80


B

60 <= marks < 70

50 <= marks < 60

40 <= marks < 50

F marks < 40
6. Write a program asking a student to enter 3 numbers. Print out the largest and the smallest number.
Teachers note -------------------- The teacher could discuss the importance of looping structures in programming with examples.
CHAPTER 10
QBASIC graphics and sound
IN THIS CHAPTER
We will learn about
The SCREEN command
Colours in QBASIC
Let us draw
The LINE command
The CIRCLE command
Playing music
Can we draw and paint in QBASIC like we do in LOGO? Yes, we can! In fact, we can draw, colour, play sound and
do many more activities using QBASIC.
You can imagine the computer screen to be divided into rows and columns just like a graph paper. The intersection of
a row and a column is a little dot. The screen is made up of lots of such little dots. Do you know that they are called?
They are called Pixels (picture elements).
The computer screen is made up of hundreds of pixels. The number of pixels tells us what the resolution of the screen
is. The more the resolution of the screen, better is the graphic quality.

Each pixel is identified by a combination of a column number and row number. This is called the coordinate of the
pixel.
The first row is numbered 0. The first column too is numbered 0.
The upper left corner of any screen has the coordinate (0,0).
Example: look at a part of the screen drawn in Figure 10.1 Each column and row has been marked with a number
(starting with 0).
Column numbers increase as you move to the right
Row numbers increase as you move down
The coordinate of this pixel is 80, 40 (column 80 and row 40).
The coordinate of this pixel is 160, 120 (column 160 and row 120).
Image 116
Fig. 10.1
THE SCREEN COMMAND
When you have to create a graphic, you will have to change the screen mode form Text to Graphic using the SCREEN
command.
The SCREEN command allows us to select a Graphics screen instead of a Text one.
There are 14 screen modes in QBASIC (from 0 to 13). The differences between the modes are mainly resolutions and
colours.
The most commonly used screen modes are 0, 7, 8 and 12.
Mode

Capabilities

SCREEN 0: Text only

80 columns by 25 rows 16 colours

SCREEN 7: Graphics

320 columns by 200 rows 16 colours

SCREEN 8: Graphics

640 columns by 200 rows 16 colours

SCREEN 12: Graphics

640 columns by 480 rows 16 colours

CLICK time
The upper left corner of any screen has the coordinate (0, 0) but what would be the coordinate of the bottom right
corner of SCREEN 0, SCREEN 7, SCREEN 8 and SCREEN 12?
Solution:

Since pixels start counting from 0, the last pixel coordinate is width-1, height-1.
Therefore, for example, in SCREEN 0 the last pixel coordinate will be 80-1, 25-1 or 79, 24.
Sm image
SCREEN 0

0, 0 79, 24

Sm image
SCREEN 7

0, 0 319, 199

Sm image
SCREEN 8

0, 0 639, 199

Sm image
SCREEN 12

0, 0 639, 479

To change the screen mode we will use SCREEN command followed by the mode number, for example, SCREEN 7.
Note: For all the graphics programs in this book, we will be using SCREEN 7.
DID YOU KNOW?

To draw SCREEN 7, 8 or 12 can be used as they support graphics.

To type a program the text screen, SCREEN 0, should be used.


To draw a line from coordinate 120, 100 to coordinate 600, 100 either SCREEN 8 or 12 can be used as they
have 640 columns.
COLORS IN QBASIC
What is drawing without colours?
Each colour in QBASIC has a number associated with it. the numbers for each colour are given below:
Number

Colour Name

BLACK

BLUE

GREEN

CYAN

RED

MAGENTA

BROWN

WHITE

GREY

LIGHT BLUE

10

LIGHT GREEN

11

LIGHT CYAN

12

LIGHT RED

13

LIGHT MAGENTA

14

YELLOW

15

HIGH INTENSITY WHITE

LET US DRAW
Remember the turtle in LOGO? It followed commands and drew straight lines in various directions.
The DRAW command in QBASIC is used to draw vertical, horizontal and diagonal lines on the screen.
To tell the computer is which direction the line is to be drawn, the following directional commands are used:
U = Up
D = Down
L = Left
R = Right
E = Upper-right
F = Lower-right
H = Upper-left
G = Lower-left
Image 117
Fig. 10.2
After each directional command, the length of the line (in pixels) should be given.
Example: This program will draw the letter W as shown below:
Image 118
60

60

30

30

The marks the starting point.


CLS
SCREEN 7
DRAW D60 E30 F30 U60

END
Other than these directional commands, there are some commands that can be used in the DRAW string. They are:
M x, y moves cursor to the point x, y
C set s the drawing colour (C is followed by a colour number)
B moves the cursor without drawing (has to be prefixed before a command)
N draws and returns the cursor to the original position (has to be prefixed before a directional command)
Examples: The program given below draws the letter Y on the screen.
Image 119
50

50 70

The starting point is 30, 60.


Draws a line of 50 pixel going down and left and the corsor comes back to the starting point.
Image 120
C1 sets the color to blue.
CLS SCREEN 7
DRAW BM 30, 60 C1 NE50 NH 50 D70
IMAGE 121
M 30, 60 moves the cursor to point 30, 60 without drawing as there is a B before M.
Draw a line of 50 pixels going up and right and the cursor comes back to the starting point.
CHECK YOUR PROGRESS
Use the DRAW(x1, y1) command to get the following output.
1. Image
2. Image
3. Image
THE LINE COMMAND
The LINE command is used to draw a line, rectangle or a square.
The LINE command is written as:
LINE (x1, y1)-(x2, y2), C, BF

Where
(x1, y1) is the coordinate of the starting point of the line
(s2, y2) is the coordinate of the end point of the line
C is the colour number
B is used only when drawing a rectangle or square. In this case (x1, y1) and (s2, y2) are the opposite
corners of the box
F is used only with B. it is used to fill the box with the foreground colour.
Example:
Sm image
CLS
SCREEN 7
LINE (20, 30)-(60, 60), 2, BF

Draws a box with (20, 30) and (60, 60)as the opposite corners. The box is

filled with color number 2.


LINE (20, 30)-(40, 45), 4

Draws a line with end point (20, 30) and (40, 45) in color 4.

LINE (40, 45)-(60, 30), 4

Draws a line with end points (40, 45) and (60, 30) in color 4

CLICK time
Mr Aiyyar wants to know what the output of the following program is. Can he do so without using the computer?
How? Help him with the steps.
CLS
SCREEN 7
LINE (50, 50)-(100, 100), 1, BF
LINE (60, 60)-(90, 90), 14, BF
LINE (70, 70(-(80, 80), 4, BF
END
Solution:
1. Mr Aiyyar should take a grid or graph paper and mark the columns and rows.
Image 122
2. Mark the coordinates given in the first LINE command LINE (50, 50)-(100, 100), 1, BF AS the letter B
suggests, this will draw a box filled with color 1 (blue).

Image 123
3. Draw a box with the two marked points as the opposite corners.
Image 124
4. Similarly mark the points for the other LINE commands and draw the respective boxes.
Image 125
5. Fill the respective boxes with colors to get the final output.
Image 126
COOT TIP
If you wish to draw a line from the end point of the last object drawn on the screen you do not need to specify the
starting point of the line.
Example: LINE (10, 30)-(200, 100)
LINE (200, 100)-(200, 170)
The starting point of the second line is the end point of the first. So, the above LINE commands can be written as
LINE (10, 30)-(200, 100)
LINE (200, 170) Skip writing the starting point
THE CIRCLE COMMAND
THE CIRCLE command is used to draw ellipses and arcs.
THE CIRCLE command is written as:
CIRCLE (x, y), R, C, Start, End, Aspect
Where
(x, y) is the coordinate of the centre of the circle
R is the radius of the circle
C is the colour number
Start and End are the starting and ending point respectively of the arc
Aspect is a number used to draw ellipses
You can omit the Start, End and Aspect values if not required.
Example: To draw a red circle with centre at 100, 60 and which has a radius of 40 pixels, the following program
will be written.
Image 127

CLS
SCREEN 7
CIRCLE (100, 60), 40, 4
END
Drawing Ovals
The Aspect option of the CIRCLE command is use to draw ovals.
Image 128
If the Aspect = 1, a perfect circle is drawn.
Image 129
If the Aspect value is more than 1, a vertically inclined oval is drawn.
Image 130
If the Aspect value is less than 1, a horizontally inclined oval is drawn.
Fig. 10.3
The default value of Aspect is 1. Therefore when drawing a circle, we do not mention the Aspect value.
Example: The CIRCLE commands to draw the oval are given below:
Image 131
1. 2 is greater than 1 so a vertically inclined oval is drawn.
CIRCLE 9100, 60), 35,,,, 1, 2
The four commas have to be placed even through no colour, start or end values are given.
Image 132
0.3 is less than 1 so a horizontally inclined oval is drawn.
CIRCLE 945, 90), 40,,,, 0. 3
CHECK YOUR PROGRESS
The ellipses drawn below have the centre 160, 100 and radius 50. Fill in the blanks.

1.

2.

1. CIRCLE (--------, ---------), 50, 2, , , ------------

3.

2. CIRCLE (160, 100), ----------, ---------, , , 1.5


3. CIRCLE (--------, ---------), ---------, 1, , , -----------PLAYING MUSIC
Music is a form of art whose medium is sound. Earlier people used to listen to music on a radio. Nowadays you
can not only enjoy music on your PC but can also create music.
Are you wondering how you can create music using QBASIC? It is very simple! You can use the PLAY
command to play musical notes. The sound is produced on the PC speakers.
To play music, use the PLAY command followed by a string of commands.
The string contains one or more of the following PLAY commands:
A-G these are the notes to be played
Ln sets the length of the note to n time units
Pn pauses of n time units.
Example: To play the seven notes, the following PLAY command will be used PLAY ABCDEFG
Now try this PLAY command and hear a famous tune played for you.
PLAY GGAGCB P2 GGAGDC P2 GGGECBA P2 FFECDC
Sm image
DID YOU KNOW?
To draw a coloured square or rectangle, we use the BF option in the LINE command. But if you want to fill
triangle or a circle with colour the PAINT command is used to colour an enclosed area.
The PAINT command is written as:
PAINT (x, y), fill colour, line colour
Where x, y is any point inside the figure to be coloured.
Try the following program which draws a coloured circle:
SCREEN 7
CIRCLE (100, 100), 30, 4
PAINT (100, 100), 2, 4
END
The following program will draw many colour circles! Have fun!

SCREEN 7
CLS
FOR M = 1 TO 20
X = INT (RND * 320)
Y = INT (RND * 200)
R = INT (RND * 100)
C = INT (RND * 16)
CIRCLE (X, Y), R, C
PAINT (X, Y), C, C
NEXT M
Image 133
LET US RECALL sm image
The computer screen is made up of picture cells or pixels.
The number of pixels on the screen determines its resolution.
There are 14 screen moders available in QBASIC.
The SCREEN command is used to change the screen mode.
The DRAW command is used to draw lines in the direction specified.
The LINE command is used to draw lines joining two points. If the B option is used then rectangles and
squares can be drawn.
The CIRCLE command draws circle and ellipses. The centre coordinates and radius of the circle have to
be specified.
The PLAY command produces sound based on the string of commands.
KEYWORDS sm image
PIXEL

intersection of a row and a column on the screen

RESOLUTION

the number of pixels on the screen

COORDINATE

combination of column number followed by the row number

TEST YOURSELF sm image


A. Fill in the blanks.
1. There are ---------------------- screen modes.
2. SCREEN 7 is used for ------------------------------3. The coordinates of the top left corner of any screen is --------------------------

4. B in the DRAW command is a -------------------------- command.


5. B in the LINE command is used to draw a ------------------------ or ----------------------6. ----------------------------- is a number used to draw ellipses.
7. P command is the PLAY command is used to ----------------B. Correct the following commands.
1. LINE (195, 103)-(80. 40), BF
2. CIRCLE (100, 140), 20, 8, , , 0.6
3. PLAY AA BB CC D EE FF GG H
4. DRAW U90 R90 B70 H40
5. CIRCLE (200, 120), 10, F
Sm image
Sm image
C. Answer these questions.
1. What is the difference between SCREEN 0 and SCREEN 7?
2. In how many directions can lines be drawn using the DRAW command?
3. How many LINE commands are required to draw a parallelogram?
4. How many LINE commands are required to draw a square?
5. What is the function of the N command in the DRAW command? Give an example.
IN THE LAB sm image
D. Writer QBASIC programs to draw the following figures. The coordinates for each point are given. You can
use the colour number to make the images more attractive.
Image 134
1. 20, 20
30, 30
50, 50
70, 30
90, 50
50, 60
70, 70
40, 80
80, 90
100, 100

2. 25, 30
30, 42
60, 35
70,

25

30, 42
40, 55
60, 55
50, 60
68, 40
Image 135
The centres and radii of the circles are given below:
Parts of figure

Centre

Radius

Face

50, 50

20

Left eye

40, 45

Right eye

60, 45

Body

50, 100

40

E. Use the DRAW command to draw the following.


Image 136
40 60, 40
80 40
Image 137
80 40 80
Image 138
80 20 20
HINT:
The starting points coordinates are given as (60, 40)
The distance between the letters can be taken to be 20
To move right to the next letter use the command BR20 (move right 20 without drawing)
F.

The notes for Twinkle Twinkle Little Star are C C G G A A G F F E C G C. Use the PLAY command to
play it on the computer.

G. Find out the notes for other famous songs or poems and play them on your computer.
PROJECT WORK sm image
H. Do as directed.
1. Write a QBASIC program that displays a list of 5 items with their codes. The user is asked to enter the
item code of the product purchased and the quantity purchased (assume that the store sells only 5 items) as
shown below:
Image 139
A bill is then printed with a smiley and message HAVE A NICE DAY!.
image140
HINT: you can assign the prices of the 5 items to variables.
2. Type the following program to make a star blink on the screen.
CLS
INPUT How many times do you want the star to blink; m
SCREEN 7
FOR X = 0 TO m
CLS
FOR Y = 1 TO 50000
NEXT Y
LINE (30, 80)-(80, 40), 14
LINE (130, 80), 14
LINE (40, 50), 14
LINE (130, 50), 14
LINE (30, 80), 14
FOR Y = 1 TO 50000
NEXT X
END
3. You have learned how to draw in QBasic and also looping. Let us combine the two to make simple
animation programs in QBasic. This program also uses a delay loop.
Try it!

CLS
SCREEN 7
FOR R = 20 TO 300 STEP-5
CIRCLE (R, 100), 10, 4
FOR X= 1 TO 50000

Delay loop

NEXT X
CLS
NEXT R
END
4. Try the following variations for some more fun!
To make the circle move faster, write a smaller number instead of 50000.
To move the circle from the right to left, change the FOR statement to
FOR R = 300 TO 10 STEP-5
To make the circle move vertically, make the following changes to lines 3 and 4:
FOR R= 20 TO 180 STEP-5
CIRCLE (100, R), 10, 4
WEB LINKS sm image
There are many interesting games created using QBasic. You can download them from
http://www.qbasicstation.com/index.php?c=p-games
Teachers note ----------------- The teacher should help the students work with graph paper to plot coordinates and also to draw
figures and work out its coordinates.
TEST PAPER 2
Based on Chapters 6 to 10
A. Fill in the blanks.

10

1. The -------------------------- tool can also be used to draw polygons and stars in Flash.
2. The --------------------------- tool in Flash allows you to close gaps in the drawing.
3. ----------------------------- elements have a start and end tags.
4. The ------------------------ section contains the content visible on the web page.

5. --------------------------- Languages are machine oriented.


6. An ----------------------- converts the high level language program code to machine language line by line.
7. A -------------------------- is an instruction that carries out commands automatically.
8. A computer ------------------------- is capable of copying itself from one computer to another.
9. ------------------------- Operators are used to combine conditions in the IF command.
10.

The Aspect value in the CIRCLE command is used to draw ------------------------

B. State whether the following commands are True or False. Rewrite the false commands correctly.
5
1. The DRAW and LINE commands have the same usage.
2. The boot sector virus infects executable files.
3. Ctrl and Break keys are pressed to break out of a loop.
4. 100010 is an example of machine language instruction.
5. HTML stands Hyper text Makeup language.
C. Correct the errors in the following code segments.

1. FOR A = 1- 10
2. DRAW BM (20, 40) U30 R30 D30 L30
3. IF A > 100 THEN PRINT EXCELLENT OTHERWISE PRONT STUDY HARDER
4. <head>
<title = SCHOOL FETE>
</HEAD>
5. WHILE AS < 5
D. Answer these questions.

15

1. List the relational operators of QBASIC.


2. How is the value of the loop variable increased or decreased in the FOR.....NEXT loop?
3. Give examples of container and empty elements.
4. What is a Trojan Horse? Give an example.
5. Why do programmers use high level languages to write programs?
E. Write a program asking the user to enter a number and then print the first ten multiples of the number
entered. U8se the WHILE... WEND loop.
F.

Write an HTML code to create a web page with the title Little Stat. The web page should display the
nursery rhyme Twinkle Twinkle Little Star.

G. Write a program to draw the following figure.

Parts of figure

Centre

Radius

Left ear

110, 65

15

Right ear

210. 65

15

Face

160. 100

50

Left eye

180, 80

10

Right eye

140, 80

10

Nose

160, 100

15

Left nostril

155, 110

Right nostril

165, 110

Sm image
The centre coordinate and radii of all the circles are given. Use different colours for each part.
N C O NATIONAL CYBER OLYMPIAD
MENTAL ABILITY
1. A circular park of 20 metre diameter has a circular path just inside the boundary of width 1 metre. The
area of the path is (in sq.m)
a. 15

b. 17

c. 19

d. 25

2. In a triangle ABD, A = 90 and D is the mid-point of AC. The value of BC2 BD2 is equal to
a. AD2

b. 2Ad2

c.3AD2 d. AAD2

3. 40% of ? + 180 = 564.


a. 960

b. 860

c. 950

d. 850

4. Any cyclic parallelogram that has unequal adjacent sides is necessarily a


a.

Square

b. Rectangle

c. Rhombus

d. Trapezium

5. The factorization of 25 p2 q2 2pq is


a.

(5 + p + q) (5 p +q)

b.

(5 + p + q) (5 p q)

c.

(5 + p + q) (5 + p q)

d.

(5 + p - q) (5 - p + q)

6. The value 6.98 6.98 2.02 2.02 is


4.96
a. 9

b. 4.96

c. 3.72

d 6.76

7. The value of 9x2 + 49xy when x = 15 and y = 3 is


a. 636

b. 576

c. 3.72

d. 6.76

8. If (X 1X ) = 5, the value of x2 + 1 x2 is
a. 23

b. 27

c. 25

d. 29

LOGICAL AND ANALYTICLA REASONING


9. Complete the series:
a.

b.

c.

10. Rectangle : Square : : Ellipse : ?

d.

a. centre

b. Diameter

c. Circle

d. Radius

11. In the given figure, the triangle represents girls, the square

represents sportspersons and the circle

represents coaches. Which portion of the figure represents girls who are sportspersons but not coaches?
a. A

b. B

c. C

d. D

12. Five boys A, B, C, D and E are standing in a row. A is between C and D and B is between D and E. Which of
the following pairs represents the boys standing at both the ends?
a. C, B

b. E, C

c. E, A

d. A, C

13. Arrange the following words in a meaningful order.


1. Frog

2.Eagle

a. 3, 4, 2, 5, 1

3.Grasshopper

b. 1, 3, 5, 2, 4

4.Snake

c, 5, 3, 1, 4, 2

5.Grass
d. 5, 3, 4, 2, 1.

COMPUTERS AND INFORMATION TECHNOLOGY


14. match the following.
Term

stands for

1. COBOL

A. formula Translation

2. DOS

B. Common Business Oriented Language

3. FORTRAN

C. Beginners All Purpose Symbolic Instruction Code

4. BASIC

D. Disc Operating System

15. Virus is a program written using one of the computer languages to cause damage to the data, the information
stored in the computer or the hardware of the computer. The most common damage done by virus is
a. To erase or corrupt useful data from the hard disk
b. To increase the file size of the command file by several 1000 byte.
c. To affect hardware components
d. To slow down the computer.
16. Match the following terms with what they stand for.
Term

Stands For

1.

.Com

A. Education

2.

.Edu

B. India

3.

.In

C. Australia

4.

.Au

D. commerce

a. 1A, 2B, 3C, 4D


b. 1B, 2C, 3D, 4A
c. AC, 2D, 3A, 4B
d. 1D, 2A, 3B, 4C
17. A browser is an interactive program that permits a user to view information from the computer. Which of the
following services does a browser perform?
a. Connecting to the source computer whose address is specified
b. Requesting a new page from the source
c. Receiving a new page
d. All of these.
18. modern computers compared to earlier computers are
a. Faster and larger
b. Less reliable
c. Larger and stronger
d. Faster and smaller
19. Who is regarded as the Father of Computer system are
a. Abacus
b. John Napier
c. Pascal
d. Charles Babbage
20. The five parts to a computer system are
a. hardware, Software, Memory, VDU and Printer
b. Store, Arithmetic and logical unit, Control unit, Input device and Output device
c. CPU, ALU, Software, Firmware and Operating system
d. Data bus, Control lines, Address bus, Memory and CPU.

Вам также может понравиться