Академический Документы
Профессиональный Документы
Культура Документы
CHAPTER 1
CHAPTER 2
20
CHAPTER 3
34
CHAPTER 4
Introduction to Flash
55
CHAPTER 5
64
Test Paper 1
CHAPTER 6 Language of the Web-HTML
77
89
95
101
116
Image 2
Image 3
Image 4
Image 5
Image 6
Image 7
Image 8
Image 9
Test Paper 2
133
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
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
4569
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.
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.
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).
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.
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
2. AutoFill
3. Alignment
5. Font
e. The black cross that appears when you point to the black square in the lower-right corner of
E. Create a Custom list with names of planets of the Solar system. Also create the following worksheet in MS
Excel.
Planet
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.
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
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;
Cells to be added
Result
A1,A2,A3,B1,B3 and B3
27
A1,A2,A3 A4 AND B1
16
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
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
A1,A2,A3 and A4
Result
4
Cells to be considered
A1,A2,A3 and A4
Result
1
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
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
Is A5 < 1?
0.05
Cells to be considered
-----------------------------------------------------------
-----------------------------------------------------------
---------
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.
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
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
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
CAMEROON
GHANA
NAMIBIA
SEYCHELLES
ISLE OF MAN
MARRTIUS
TONGA
BANGLADESH
GUYANA
SAINT LUCIA
Create a worksheet like the one shown alongside to help your younger brother/sister practice math problems
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.
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
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.
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.
To add the current date and time click on the Date & time button on the Design tabs Insert group.
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.
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
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
typed
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.
wood
teh
the
darb
drab
color
colour
atitching stiching
giggling
giggling
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
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 ----------------------
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
subselection
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
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):
2.
3.
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
PENCIL TOOL
OVAL TOOL
RECTANGLE TOOL
POLYSTAR TOOL
BRUSH TOOL
ERASER TOOL
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
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.
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.
10
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.
<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
<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
WEB PAGE
HOME PAGE
HTML
TAG
ATTRIBUTE
CONTAINER ELEMENTS
EMPTY ELEMENTS
HTML ELEMENT
HEAD ELEMENT
Contains text and tags that do not show directly on the screen
BODY ELEMENT
TITLE ELEMENT
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.
Write the HTML code to create a Web page for your mother with the following:
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
Programming languages
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.
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
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
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
Column B
1. 11000100
a. Application software
2. JAVA
3. DOS
4. NOTEPAD
d. Operating system
5. mov m, a1
D.
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
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
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.
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
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.
THEN <instruction1>
ELSE <instruction2>
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
10
Indian
True
False
18
American
True
False
25
Indian
True
True
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
N$
Condition 1
Condition 2
Result
14
American
False
False
10
Indian
False
True
18
American
True
False
25
Indian
True
True
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
>=
<=
Not equal to
<>or >>
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
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
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)
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 7: Graphics
SCREEN 8: Graphics
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?
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
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
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
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
Draws a line with end point (20, 30) and (40, 45) in color 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.
3.
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
RESOLUTION
COORDINATE
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
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.
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
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.
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
b. 860
c. 950
d. 850
Square
b. Rectangle
c. Rhombus
d. Trapezium
(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)
b. 4.96
c. 3.72
d 6.76
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
b.
c.
d.
a. centre
b. Diameter
c. Circle
d. Radius
11. In the given figure, the triangle represents girls, the square
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
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.
stands for
1. COBOL
A. formula Translation
2. DOS
3. FORTRAN
4. BASIC
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