Sie sind auf Seite 1von 15

Bright Future Computers & Science Academy

03009688161
10th Class Computer Science Notes
CHAPTER NO- 1 "Problem Solving"
What is meant by problem solving? What steps are involved in problem solving? Describe briefly.
Problem solving: - whenever we are writing a computer program, our purpose is to solve a problem
computationally. So the basic purpose of computer programming is solution of our daily life problems of different
areas. This process of programming is called problem solving. Problem solving is not just type a program and
then checking its output but it is a process in which multiple steps are involved. These steps are following:1. Define the problem:- First of all, problem is defined. What is purpose of program? What are inputs and outputs?
2. Solve the problem: - In second step, problem is solved theoretical on paper. Then program is written in general
English that is called Algorithm.
3. Drawing flowchart: - The flowchart is practical form of Algorithm, which is made with geometrical symbols.
4. Program coding: - In this step program is written on computer in appropriate computer language. After writing
the program. It is saved in computer.
5. Testing and debugging: - As program coding is completed then it is run, tested and corrected. This process
called testing and debugging.
6. Documentation: - In this process, comments and notes about working of program are written. They will help in
future to editing the program.
Define algorithm. Write down an algorithm to find the largest amongst three number a, b, c.
Algorithm:- The step by step procedure for solving a special problem is called algorithm.
An algorithm to find out greater number:1. Read any three numbers A, B, C.
2. If A is greater then B and A is greater then C, then print greater number A as a
3. If B is greater then A and B is greater then C, then print greater number B as a
4. If C is greater then A and C is greater then B, then print greater number C as a
What for we use flowcharts? Write down the standard flowchart symbols.
FLOWCHART:- A geometrical representation of the solution of a problem or algorithm of a program is called
flowchart.
It helps the programmers to understand the program algorithm.
It is very easy to translate a flow chart into program.
With a flow chart the document process can be done easily.
Symbols of flow chart:- These are different geometrical symbols that are used in drawing flowcharts. There are
many symbols used in flow chart but most easy and commonly used are:
1. Terminal symbol: - The terminal symbol is used to show the starting and finishing of a process.
Start/Stop.
2. Input output symbol: - The input output symbol use to input the data as well as the output of the result.
Read As, B
3. Processing symbol: - This symbol is used to show the processing.
Sum = A+B
4. Decision symbol: - This symbol is used to make decision.
Yes/No True/False
5. Arrows keys: - These are used to show the order is to be carried out arrows connect with complete diagram.
6. ON-Page connector: - If a flowchart is divided into many parts on the same page, the On-page connector
symbol is used to connect one part of the flowchart with another one.
7. OFF-Page connector:- Some time when an algorithm is large and complicated, the flowchart is drawn on more
than one page. In order to connect one part of the flowchart on one page with another part on another page, an
off-page connector symbol is used.

Bright Future Computers & Science Academy


03009688161
What is programming debugging? Write the types of errors which can occur in programs.
The process of removing errors in computer programs is called debugging. There are three types of errors in a
computer program.
(1) Syntax or Grammatical Error.
(2) Logical Error.
(3) Execution Error.
(A) Syntax Error: - By syntax errors, we mean those errors which are generated as a result of ignoring the
grammer or syntax of the programming language. For example, in BASIC, if you type PRINTE instead of PRINT
or type ENPUT instead of INPUT or type a statement like INPUT D, P1 without a statement number, clearly you
are making errors. Such errors are called syntax errors.
(B) Logical Error: - Whenever there are no syntax errors in the program at the execution time, but still the program
generates a non-valid result then it means that there is some logical error. It is important to note that logical errors,
as the computer cannot detect them, are considered difficult to remove. For example, when we want to obtained
the AVERAGE of THREE numbers, then we divided the SUM in THREE numbers. If we divided SUM in FOUR
numbers instead of THREE that is a Logical Errors.
(C) Execution Error: - When the computer displays error massage at run time or execution time, even though the
program neither contains syntax nor logical error, then such type of errors is called execution errors.
Example: - Get three numbers, add Its and 2nd values and divided their sum by the 3rd value. The result is then
display on the serene.
10 Input A, B, C
20 D= (A+B)/C
30 PRINT D
40 END
When this program is run, it asks for values and then displays the output as:
? 10, 20, 30
1OK.
This works quite fine. However, if we enter 0 values for C means want to divide the sum of A and B by 0 then the
computer displays the following errors message:
? 10,20,0
Division by zero
OK.

CHAPTER-2 "Data Type Assinment & input/output Statement"


Q NO: - What do you know about basic language? Write down its history and advantages.
Introduction to BASIC: - The word BASIC stands for Beginners All purpose Symbolic Instruction. BASIC language
is one of the simplest high- level languages in use today. It is a general- purpose programming language. It is
effective for many applications such as, business, science, games and education. Actually BASIC was designed
for use in teaching the elementary principles of computer programming in a straightforward manner. That is why, it
is particularly well suited for person learning to program for the first time. Because of its simplicity, it is now used
almost universally. In Pakistan, many high and junior schools now offer courses in this programming language.
HISTORY OF BASIC: - BASIC was developed by Dr.John G.Kemeny and Dr.Thomas E.Kurtz at Dartmouth
Collage in the mid 1960s in an effort to provide a simple teaching language for beginners of computer
programming. As BASIC was a simple and user-friendly language, so very quickly it became one of the most
widely used languages in schools, and universities. It was also adopted as a principal language by several
commercial timesharing services. All this made it a very popular language among thousands of computer users.

Bright Future Computers & Science Academy


03009688161
ADVANTAGE OF BASIC LANGUAGE: There are the following advantages of the basic language.
1. It has very simple and easy grammatical rules and therefore, easy for beginners to learn, and as such, can be
learned in a very short period of time.
2. BASIC is an All-purpose programming language. It is equally suitable for solving scientific and engineering
problems as well as for business applications
3. BASIC has conversational nature, which makes communication with a computer simple, easy and almost
natural.
4. BASIC is a user-friendly language. It is not a purely teaching language likes others and therefore, user fined it
friendly.
5. Computer games can be developed in BASIC language requiring the use of graphics as well as sound
generations.
6. One of the advantages of BASIC is its much built- in functions.
7. BASIC has the staying power to keep you hooked and busy until you have become an expert.
Q NO: - What do you meant by a program? Write down the structure of a BASIC program.
PROGRAM: - BASIC, lick other languages, has its own syntax or structure. Each instruction in a BASIC program
is written as a separate statement that is called program.
Structure of a BASIC program: - A complete BASIC program consists of a sequence of statements, which are
executed in ascending order. General rules for writing a BASIC program are as follows.
? Each statement must begin with an unsigned positive integer quantity known as a statement number (Line
number).
? Two statements cannot have the same statement or line number.
? Successive statements must have increasing statement numbers.
? Each statement number must be followed by a BASIC key word (like PRINT, READ, INPUT etc) indicating the
type of instruction that is to be carried out.
? Each statement begins with a statement number and ends with a Carriage Return (ENTER/RETURN/CR/).
? Each statement with an END statement, physically, it can by written any where in the program, but logically it
must be the very last statement to be executed.
Q NO: - What for we use operator? What are its types? Explain each with suitable examples. Also explain
priority of operators.
Operators are special characters used to perform specific operation on their operands (data type). In BASIC
language we use three types of operators, which are listed below.
ARITHMETIC OPERATORS: 1. Following are the arithmetic operations.
+ Use for addition
- Use for subtraction
* Use for multiplication
/ Use for division
\ Use for integer division
MOD MOD used for remainder in division e.g 5 MOD 2 = 1
^ Used for power or exponentiation
() Used to change the default priorities of operators.
REALTIONAL OPERATORS:2. Following are the relational operators.
< Used for less than
> Used for greater than
= Used for equal to

Bright Future Computers & Science Academy


03009688161

<> Used for not equal to


<= Used for less than or equal to
>= Used for greater than or equal to
3. LOGICAL OPERATORS:In BASIC we have three logical operators, which are AND, OR and NOT. AND and OR operators are used to form
compound conditional expressions, in which more than one logical conditions are tested in the same statement.
The NOT operator is used to negate an operand (i.e. change true to false and false to true)
CONSTANTS: - A constant in BASIC is something that does not change its value during execution of the
program. There are two types of constants; Numeric constant and string constant.
Numeric Constants: - Numeric constants are positive or negative number. A plus sign is optional for a positive
number. A numeric constant in BASIC cannot contain commas. For example: 23, -4.756, + 38.15
String Constants:- A string constant is any set of characters enclosed in quotation marks. Blank spaces may be
included in a string but not quotation marks. A string constant is a sepuence of 255 alphanumeric characters
enclosed in double quotation marks. For example:AREA OF TRIANGLE
** I LOVE PAKISTAN**
23 RD MARCH
Variables: - Variables are the names or labels used to represent values that are used characters, the first
character must be a letter like A, B, A1, A2 etc. However longer names may also be used. The number of
character that can be used varies in different versions of BASIC. There are two types of variables.
Numeric Variable: - A numeric variable always has a value that is a number. This value is assigned to the variable
during the execution of a program.
For example:10 Let A = 5
20 Prints A
30 End
String Variable: - A string is a sequence of characters that is letters, number, and certain special characters such
as +, -, *, =, $, ?, etc. Blank spaces are also variables but the computer does not use them in calculations.
A string variable must be written as a letter followed by a dollar sign for example A$, B$, NAME$ etc. as used in
the following programmed.
1 Let A$ = I
20 Let B$ = LOVE
30 Let C$ = PAKISTAN
40 Print A$, B$, C$
50 End
Write short notes on the following?
1:- BASIC character set: - The BASIC character set consists of numeric character, alphabetic characters and
special characters.
The numeric characters are 0.1,2,3,4,5,6,7,8, and 9.
The alphabetic characters are upper and lower- case letters of the English language.
(A, B, C, D Z ANSD a, b, c, dz).
The special character are the Period (.), Comma (,), Semicolon (;) etc.
2:- Reserved Words: - Reserved words are those words which are reserved in the language for the specific
purpose and cannot be used for any other purpose. These have special meaning and computer knows their
meanings.

Bright Future Computers & Science Academy


03009688161

Some of the most frequently used BASIC Reserved words are given below.
ABC AND ASC ATN AUTO BEEP
CHRS CINT CIRLCE CLOSE COS DATA
DATES DEF DELETE END DIM ELSE
FILES FIX FN FOR GOSUB GOTO
IF INKEY$ INPUT KILL LIST LOAD
NEW MOD NEXT PRINT READ REM
RETURN RUN SAVE SQR STEP STOP
SWAP SYSTEM THEN TO WRITE etc.
Modes of Operations:- In BAISC there are two types of Modes are used:Direct Mode:- The direct Mode instruction are executed directly, to perform the desired task, as and when entered
without the need for using RUN command. After each direct command the screen display OK prompt.
Indirect Mode: - Each statement begins with a statement number; we call it Indirect Mode of operation. In this
case all the statement is stored in the memory and is executed only when RUN command is display.
Difference between:? Constant and Variable: - Constant is a value that can not be changed, while variable, unlike constant, change
their value during the execution of program.
? Numeric variable and String variable: - A numeric variable is used to hold only numeric constants. For
example: - A, XYZ, Ali etc. A string variable is used to hold characters. These characters may be alphabets,
number, or special symbols. For example NAME$, ADDRESS$, A1$.
? Commands and statements:- Commands is the name of action while a statement ask computer to do some
work. Each statement can be consists of one or more lines.
? Input statement and Red and Data statement:- Input statement is used to accept input data from keyboard and
assigns this to a variable. This input data may be a numeric value or character string.
Syntax: - [line no] Input {prompt} [variable] {variable}.
Example: - 15 INPUT A$, PH_NO
Read and data statement: - READ statement is used to assign numeric values
or character strings to variables. These numeric values or character strings are provided by DATA statement. For
each variable of READ statement there should be one value of same type in DATA statement.
Syntax: - [line no] READ [variable] {arable}
. [Line no] READ [variable] {arable}
Example:- 30 READ CITY$
40 DATA KAMOKE

CHAPTER NO-3 "Transfer of Control"


Q NO 1:-What is transfer of control? What type of jumps can be made in BASIC? Explain with example.
Introduction: - In a basic program statements are executed one after other in a sequence of increasing line
numbers. Sometimes, however, it is necessary to jump from one part of the program to another, thus changing the
default sequence of execution. The statements used for such jumps are known as transfer of control statements.
There are two types of such statements:
1. Unconditional transfer of control statements
2. Conditional transfer of control statements
Unconditional transfer of control statements: - Those statements which do not need any condition to jumps form
one part of the program to another e.g., GOTO, ON, GOTO.

Bright Future Computers & Science Academy


03009688161

Example:10 a = 0
20 a = a+1
30 print a
40 goto 20
50 end
Conditional transfer of control statements: - Those statements which transfer control to other part of the program
based on same condition are known as conditional transfer of control statements e.g. IF/THEN/ELS.
Example:10 cls
20 input marks
30 if marks>33then 50
40 if marks<33then 70
50 print you are pass
60 goto 80
70 print you are fail
80 end
Q NO 2:-What is nested loop? What rules must be followed when using nested loops?
Nested Loops:- By nested loops we means one loop within another loop.
Actually, sometimes we need to perform repetitive tasks within a loop. In such a situation we use Nested loops. Its
structure looks like.
10 FORK =1 TO 10
20
30
40 FORX = 1 TO 20
50
60
70 NEXTX
80
90
100 NEXTK
110 END
The rules for written single loops apply to nested loops. Other rules are;
1. Each nested loop must begin with its own FOR-TO statement and end with its own NEXT statement.
2. An outer loop and an inner lop cannot have the same index variable.
3. Each inner (nested) loop must be completely embedded with in the outer loop i.e; the loops cannot overlap.
4. Control can be transferred from an inner loop to a statement in an outer loop or to a statement out side of the
entire nest. However, control cannot be transferred to a statement with in a nest from a point out side the nest.
Q NO 3:-What is the difference between?
Loop: - a loop is a set of statement which is executed repeatedly.
Nested loop: - By nested loops we mean one loop within another loop.
Conditional transfer of control statements: - Those statements which transfer control to other part of the program
based on same condition are known as conditional transfer of control statements e.g. IF/THEN/ELS.
Unconditional transfer of control statements: - Those statements which do not need any condition to jumps form
one part of the program to another e.g., GOTO, ON, GOTO.
IF/THEN/ELSE and ON/GOTO statements: - It is similar to the IF-THEN statement, with an added power to

Bright Future Computers & Science Academy


03009688161
transfer control to another part of the program whether the condition is true or false.
e.g., 10 IF marks>33 THEN PRINT PASSELSE PRINTFAIL
THE ON/GO TO statement: - It is multiple branching unconditional transfer of control statement which is used to

transfer control to any one of the indicated line numbers.


e.g., 40 on choice GO TO 15,35,60,100,60.
FOR/NEXT LOOP statement: - This is a loop which is used to perform repetitive tasks and is used when we know
in advance the number of times the loop will be executed.
WHILE/WEND LOOP statement: - It is used when the numbers of repetitions are not known in advance. It has the
capability to be terminated any time depending on the condition.

Chapter No-4 "ARRAYS"


Q:-WHAT IS AN ARRAY? WRITE DOWN A DETAILED NOTE ON ONE DIMENSIONAL AND TWO
DIMENSIONAL ARRAYS?
ANS:-ARRAYS:-An array can be defined as a subscripted variable that has upper and lower bounds as its ending
and starting positions and that subscripted value may range between these two bounds, is called an array.
Types of arrays:An array can be categorized into two types on the basis of these rows and columns. These types are given one by
one below:
One dimensional array:
A subscripted variable in which a single variable is used to represent the subscripts of the array and ranges
between the lower and upper bounds of the array is called one-dimensional array. An example of such arrays in
the real life may be a matrix consisting of rows or columns only.
Two dimensional arrays:A Two dimensional array consist of two subscripts in which ,the first represents the number of rows between the
lower and upper bounds of row values and the second represents the number of columns between the lower and
upper bounds of columns values. An example of such array is the two dimensional matrix which has two or more
than two rows and two or more than two columns. Such an arrays can be diagrammatically shown as
Q:-Why do we use (DIM) statement? If omitted? What will happen? Write down the detailed note on its
use?
Ans:-if we want to declare an array then it is called DIM statement. With DIM statement we can also declare two
dimensional arrays. Two dimensional arrays, which has two subscripts to identify each element of the array.eg
A(3,2)
SYNTAX:For single dimensional arraty
[Line no]DIM [variable (subscripts)], {variable (subscripts)}
For double dimensional array
[Line no]DIM [variable (subscripts, subscript)]
EXAMPLE:10DIM AR (90)
These statements will create a single dimension array in memory with 90 subscripts.
20 DIM NAME$ (26), RNO (26), CLASS (26)
These statements will create three single dimension arrays in memory each with 26 subscripts.
30 DIM TBL (10, 10)
These statements will crate a double dimension array in memory each with 100 subscripts. These array elements
are denoted like.
TBL (2, 5), TAB (5, 3).

Bright Future Computers & Science Academy


03009688161

PROGRAM: - Now we make a program to learn the use of arrays.


This program will count down the values from 25 to 5 with interval of 5 and then count up from 5 to 25 with same
interval.
10 DIM A (5)
20 FOR 1= 1 TO 5
30 READ A (1)
40 NEXT 1
50 DATA 5,10,15,20,25
60 FOR 1= 5 TO 1 STEP -1
70 PRINT A (1)
80 NEXT
90 FOR F= 1 TO 5
100 PRINT A (F)
110 NEXT 1
PROGRAM: - This program is used to find the smallest number.
10 DIM K (100)
20 INPUTHOW MANY NUMBER YOU WANT TO ENTER;N
30 FOR 1= 1 TO N
40 INPUT K (1)
50 NEXT 1
60 KK= K (1)
70 FOR J= 2 TO N
80 IF KK>K (J) THEN KK= K (J)
90 NEXT J
100 PRINT KK
110 END
Chapter- 5 "Subprograms"
Subprograms:- A subprogram is a set of statements which are written once in the program and used or called
many times in different places of program.
Basic language offers two types of sub programs.
1:-subroutnes subprograms
2:-functions Subprograms
Functions Subprograms: - Functions are those sub programs which are used to replace simple process such as
calculating the square of a number, finding out the natural logarithm of a number and so on.
Subroutines subprograms: - Subprogram which are used to do complex programming operations like calculating
the roots of a quadratic equation, solving a matrix and soon.
What is the purpose of intrinsic functions? Why do we use them? Explain with suitable examples the
different types of intrinsic functions.
Purpose of intrinsic: - They perform the most basic operations like calculating the square root, sine, cosine,
tanguage of angles and so on.
Why do we use them: - When we want to solve the most basic operations like calculating the square root, sine,
cosine, tanguage of angles and so on then we use intrinsic functions.
Types of intrinsic functions: - Then are categorized follows:1. Numeric function: - The number of built-in functions which can be used for mathematical calculations. These
functions return a number as their results.

Bright Future Computers & Science Academy


03009688161

They are: Trigonometric functions:Functions purpose


Sin(X) Calculates the sine of X.
Cos(X) Calculates the cosine of X.
Tan(X) Calculates the tangent of X.
Atn(X) Calculates the tangent inverse (arctangent) of X.
Arithmetic functions:Functions purpose
SQR(X) Calculates the square root of a given number.
LOG(X) Calculates the natural logarithm of X.
EXP(X) Calculates the exponential value of X.
2. String Functions:- The number of built-in functions which can be used for manipulations of string data. These
functions return string and numeric values as their result. They are:Functions purpose
LEFT$(Sring,n) Selects the left most n characters of the given string.
If n is greater then the number of characters
Contained in the string, the entire string will be printed.
RIGHT$(String,n) Selects the right most n character of the given string.
3. String$ functions:- This string functions is used to repeatedly print out a character specified by the given ASCII
number to the function STRING$. This functions has the following general form:
STRING$(N,M).
Exp:- 60 PRINT STRING$(3,67)
4. Time$ functions:- The TIME$ is a built-in functions in BASIC which is related with system time. It is used to
show the current time or used to set the new time of the system.
Exp:- 10 PRINTTIME$ and
20 TIME$ =16:00:00
5. Date$ functions:- Like time$ functions Date$ functions is used to display the current date, or set the new date of
the system. The general syntax as:Line DATE$.
Exp:- 10 DATE$ =03-07-2001
6. ASC functions:- It is the inverse of CHR$ function, which returns corresponding character for a given ASCII
value, because it returns the ASCII code for a given character. Its general form is : ASC(X$)
10 PRINT ASC (ABC).
7. LEN Function:- This function is used to print the total number of characters contained in the string. It has the
general from like.
LEN(X$)LEN () Will print 0 where
LEN (Nafid ullah khan).
8. VAL function:-This function is used to return to return the numeric value of the given string argument in a string
of numbers enclosed in the double quotation. It must be noted that the string must be the combination of number.
Its general form.
VAL(X$)
Exp:- A$= 852772
9. OCT$ function:- This functions is used to calculate the equivalent of a decimal number in the octal number
system. The general form:

Bright Future Computers & Science Academy


03009688161
OCT$(Decimal Number).
10. HEX$ function:- That is used to calculate the Hexadecimal equivalent of a number which is in the decimal
number system. The general form:
HEX$(Decimal Number).

CHAPTER 6 Graphics
What is meant by computer graphics? What do you know about different modes of graphics in BASIC?
Explain.
Computer graphics: - Graphics is that area of computer programming which is highly in use these days. It is that
type of programming in which we draw text or pictures i.e., shape and images on the screen of the computer.
Types of Graphics: - There are three modes of drawing Graphics.
1. Text Mode: - It is the first mode of drawing graphics and it refers to drawing number, letter and special
characters (like $, % and so on) in the graphics form like high lighting, make them blinking or to convert them into
invisible form.
In text mode these characters are displayed in terms of 25 rows x 40 columns or 25 rows x 80 columns on the
screen of the computer monitor.
2. Medium-Resolution Graphics Mode:- In this mode of Graphics, the display is divide into a matrix consisting of
320 columns and 200 rows of pixels. This graphical mode works with 4 columns. The columns are numbered from
0 to 319 and the rows from 0 to 199.
3. High-resolution graphics Mode: - High-Resolution graphics Mode contains more pixels than the medium
resolution mode. In this mode the screen is divided into 640 columns and 200 rows which make a matrix of 640 x
200 pixels. This high resolution is used to facilitate more precise and clear drawing of graphics.
Why do we use CIRCLE statement? Explain with suitable example.
Some time we need to make a circle. In order to draw a circle, we use the CRICLE statements. This statement
has the following general form:
Line# CRICLE(X, Y), radius [colour].
Where (x,y) is the position of the point that is located at the center of the circle and radius is the radius of the
circle. The colour value is optional and is used to colour the circle with specific colour selected according to the
graphic mode and the available colour palette. An example may be:
20 CIRCLES (110,150), 70
Which is used to draw a circle of radius equal to 10 and having the pixel located at?
(110,150) as its center.
Example: - This program is used to draw a circle one with in another by using CRICLE statements, as following:
10 CLS
20 SCREEN 1
30 FOR = 60 TO 10 STEP 10
40 CRICLE (100,50);I
50 NEXT I
60 END
Write the purpose and complete syntax of DRAW statements. What types of shapes you can draw with
this statement? Give two examples.
This statement is used to draw lines and other shapes on the screen of the monitor. This statement is used in both
the resolution graphics modes, which are the medium resolution and high resolution graphics mode.
The general form of DRAW statements is:
Line # DRAW string
Where string may be enclosed in quotes and its contain commands to create a shape on the screen. This string
may be using one of the following commands:

Bright Future Computers & Science Academy


03009688161
Un is used to move up n points or pixels.
Dn for moving down by n points or pixels.
Fn for moving left n points or pixels.
R for moving right n points or pixels.
En for moving diagonally down and right by n points i.e., pixels.
Gn for moving diagonally down and left by n points i.e., pixels.
Hn for moving diagonally up and left by n points or pixels.

When one of these commands is executed, a line is drawing n from the starting position which has been specified.
Thus this drawing utility of BASIC language is used to specify the number of points or pixels and the specific
direction in which the line is to be drawn.
By DRAW statements we draw the following shapes:This program is used to draw a square.
10 CLS
20 SCREEN 1
30 DRAWU40L50D40R50
Program 2:- This program is written to draw a rectangle.
10 CLS
20 SCREEN 1
30 DRAW U40R70D40L70
What is the role of SCREEN statements? Write down its different modes and their effect on the graphic quality.
SCREEN statement:- SCREEN statement insert effect on the graphic quality.
It must be notified that the statement SCRREN 1 is used to select an appropriate screen mode i.e., Medium
Resolution graphics mode. The general form of the SCREEN statement is:
Line # SCREEN Mode.
There are three modes of SCREEN statement:1. Mode = 0:- If mode = 0 that is, SCREEN 0, then text is selected.
2. Mode = 1:- If mode = 1 that is, SCREEN 1, then Medium Resolution mode of graphic will be set.
3. Mode = 2:- If mode = 2 that is, SCREEN 2, then High Resolution mode of graphic will be set.

CHAPER NO-7 "Word Processing"


Q NO 1:- What do we mean by Word Processing? Which word processors are available in the market?
What is the advantage of MS.WORD over other word processors?
WORD PROCESSOR: - Word processor can be defined as processing the words electronically. Word processor
is a computer program, which gives set of commands and tools to process the words electronically using a
computer. In Word we write the simplest documents like application, letters, memos, and most complex
documents like reports and books.
Word processing are available in the market:- In market different word processor are available. Most commonly
used are MS-Word and Word perfect. In 80% of the offices and homes MS-Word in used.
Q NO 2:- Write detailed not on the environment of MS- Word?
The MS- Word environment has the following common components.
TITLEBAR: - The top line of the MS-Word program is called title bar. It shows the name of the program.
MENUBAR: - It gives the list of commands or options that a user can apply on his documents.
TOOLBAR: - These are the set of commands shown in the form of pictures below the menu bar. They are
executed by the click of the mouse.
RULER: - It is located below the toolbar and used to show the position of the text on the page both horizontally
and vertically.
Document area: - This is the area usually white in color provided to the user to write his document.
SCROLL BAR: - They are used to control the movement of the document if it cant fit in the space provided by the

Bright Future Computers & Science Academy


03009688161
Word processor. They are two types.
HORIZONTAL: - It controls the horizontal scrolling of the text.
VERTICAL: - It controls the vertical scrolling of the text.
STATUS BAR: - It is bar located at the bottom of the window.

Q NO 3:- Write the complete steps to perform the following:


1. Loading MS-Word.
M: - Start? program? accessories? MS-Word.
2. Create a new folder in MS-Word.
M: - File?open?click create new folder? type name.
3. Create a table to contain 20 rows and 10 columns.
M: - Table?insert?table?select rows? select columns?ok.
4. To include header and footer.
M: - View heater and footer type header and footer?ok.
5. Insert picture in a chart in a Word processor.
M: - In chart dialog box? edit? import file? select picture? open.
Q NO 4:- What is the difference between?
Save: - This option is used to save the current file in your computer.
Save as: - This option is used to make another copy of the save file.
Paste:- This option is used to past your selected data.
Past special:- This option is used to past the formatted data, unformatted data, and other options.
Print: - This option is used to print the current file according your instructions.
Print preview: - This option is used to display the full page of the current printed file.
Undo: - This option is used to restore deleted data.
Redo: - This option is used to repeat the last commands.
Full screen: - This option is used to display full screen of the current file.
Zoom: - This option is used to display current file according your own percent.
Q NO 5:- Write the purpose of the following?
(1) Replace: - In the help of this option we replace one text to another.
(2) Footnotes: - In the help of this option we write comments in the end of the documents.
(3) Style: - In the help of this option we change the font in different style.
(4) Filed: - In the help of this option we select any filed for us.
BASIC STATEMENT
LET STATEMENT: - It is one of the most fundamental and most important statements of BASIC language. This
statement is also called as assignment statement, because it is used to assign a numeric or string value to a
variable. LET statement has the following general form:
Line# LET Variable = [constant]
[Variable]
[Expression]
Exp:Let A$=NAFID Let X = 8
Let B$=YULIA Let Y = X+2
Let B$ = A$ Let X = X+Y
Let A$ = B$ PrintResult = ;Z

Bright Future Computers & Science Academy


03009688161
PRINT A$,B$ End
END
PRINT STATEMENT:- Print statement is used to display the data on the screen. It can be used to display
message, value of variables and to print the answers of arithmetic expression. The PRINT statement has the
following form:

Line # PRINT [OR?] [Constant]


[Variable]
[Expression]
Exp:To Print Blank lines:10 PrintNAFID ULAH
20 Print
30 PrintYULIA
40 Run
To Print Constants: Printsoma
10 Print 9 PrintHell! How are you?
20 Print -100 PrintWellcome to show
30 Print 3.14159 Print **************
40 Print 1.23E+2 Run
50 Run
LPRINT STATEMENT: - It is used for printer output. It is used to print output data on the printer rather than on the
screen. It has the following general form:
Line# LPRINT {Constant, Variable, and/ Expression}
Exp:
20 LPRINT X; Y; Z
PRINT USING STATEMENT:- It is used for formatted that is allows printed output to be formatted. Both numeric
and string data can be rounded as well as +,-,$ Signs can easily be inserted in the output result. Syntax:
Line# PRINT USING Format string; List-of-expressions
10 Print using####; 44
REM STATEMENT: - REM Statement is used to include comments/remarks in BASIC program. This statement
consists of statement number followed by the keyword REM, followed by any remarks. It has the following general
form:
1. Line # REM [OR,] Any Comments.
Exp:
10 This is a comment line.
END STATEMENT:- END statement is used to terminate the execution of the program. It can be given anywhere
in the BASIC program physically but logically it must be the very last statement of the program. Though the END
statement is optional to use, but it is a good programming practice to include the END statement in all BASIC
programs. The END statement has the following format:
LINE# END
LOOP: A loop is an instruction or group of instruction that the computer executes repeatedly to a specified number
of time or until some terminating satisfied

Bright Future Computers & Science Academy


03009688161
Or
Repetition of statement
1:
10 For I=2 to 20
20 Print I
30 next
2:
10 For I = 2 to 20 step 2
20 print I
30 next

BASIC COMMANDS OF BASIC LANGUAGE


Auto Commands (Alt+A):Auto Commands are used to generate the line number automatically.
Syntax: - Auto (Enter).
Syntax: - Auto 2 (Enter).
Syntax: - Auto 100 (Enter).
Syntax: - Auto 10, 50 (Enter).
Syntax: - Auto 100,100 (Enter).
To End Page Break: - Clt+Break.
List Commands (List). (F1)
Its produce the entire list of the program on the screen.
Syntax: - List (Enter).
Syntax: - List 40 (Enter).
Syntax: - List 100-200 (Enter).
Syntax: - List -80 (Enter).
Syntax: - List 80 (Enter).
Run Commands (F2).
To execute the Basic program.
Syntax: - Run (Enter).
Load Commands (F3).
To load a program to disk into memory.
Syntax: - Load Basic. Bas (Enter).
Save Commands (F4).
To save the Basic program on disk.
Syntax:-Save File name (Enter).
Delete Commands (Alt+D)
The delete commands are used to delete a program statements or a group of statements.
Syntax: - Delete (Enter).
Syntax: - Delete 70 (Enter).
Syntax: - Delete 80-150
Syntax: - Delete -100
Syntax: - Delete 100Renum Commands:The Renum commands are used to renumber the program statements numbers.
Syntax: - Renum (Enter).
Files Commands:To display all Basic Files.

Bright Future Computers & Science Academy


03009688161
Syntax: - Files (Enter).
Kill Commands:It is used to delete Basic files permanents.
Syntax: - Kill File name.bac (Enter)
Key Commands:It is used to change the name of the file.
Syntax:- Nameold file nameAS new file name (Enter)