0% found this document useful (0 votes)
10 views6 pages

Std IX-computer

Uploaded by

Marciano Tom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views6 pages

Std IX-computer

Uploaded by

Marciano Tom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ST. JOHN’S SR. SEC. SCHOOL & JR.

COLLEGE
MANDAVELI, CHENNAI – 600 028.
CLASS: IX

SUBJECT: COMPUTER SCIENCE

TEACHING NOTES
________________________________________________________________
Lesson 1 –Designing a Program
I. Fill in the blanks:
1. Any task which is done by computer need systematic ___planning___ and ___thinking___
2. To develop a program, it contains 6 phases.
3. Gathering the required resources to solve the problem comes under problem analysis.
4. Top-down approach will design the function from__Higher level ___ to ___lower level___
5. Flow chart is a pictorial representation of procedure.
6. Algorithm will be translated into coding and documentation.
7. Program details built-in within the program is called internal documentation.
8. Step-by-step procedure in logical order is called pseudo code.

II. Answer in short:


1. Name the different phases which are required to develop a program?
To develop a program there are six phases:
 Problem Definition
 Problem Analysis
 Algorithm
 Coding and Documentation
 Testing and Debugging
 Maintenance
2. What is flow chart?
The method to design a step-by-step procedure in a diagrammatic or pictorial form is called
flow chart.
3. What is pseudo code?
The method to write a step-by-step procedure in logical order is called pseudo code.
4. What is debugging?
The code which is written will be tested by giving the possible inputs and checked
for errors. If the errors are there in the code it will be debugged. The process of correcting the errors
is called debugging.
5. What do you mean by algorithm?
To develop a step-by-step procedure to solve the problem is called algorithm.

6. What do you mean by internal documentation?


Documentation means the description of the program is written in simple English language.
Some details may be built-in within the program, which is known as internal documentation.
III. Answer the following questions:
1. Explain the different phases to develop a program..
To develop a program there are six phases:
PROBLEM DEFINITION:
In this phase, the problem statement will be defined. We have to understand the problem
statement and analyze the requirements, solutions and output of the problem statement.
PROBLEM ANALYSIS:
In this phas4e, we need to understand the nature of the problem and what task to be done
to solve the problem. The following are the resources that are used to solve the problem:
 Variables
 Functions
 Kind of output needed
 Constraints and conditions to be used to operate the program.
ALGORITHM:
Once the outline of the problem is analyzed, the next step is to work on developing a step-
by-step procedure to solve the problem, which is called algorithm. A method that is used to design a
step-by-step procedure in a diagrammatic or pictorial form is called flow chart. Another method to
write the procedure in logical order is called pseudo code.
CODING AND DOCUMENTATION:
In this phase, we have to write the code for the algorithm. The algorithm will be translated
into a set of information that a computer can understand.
TESTING AND DEBUGGING:
During this phase, the code which is written will be tested by giving the possible
inputs and checked for errors. If the errors are there in the code, it will be debugged. The process of
correcting the errors is called debugging.
MAINTENANCE:
In this phase, the program has to be maintained and upgraded periodically if the
changes are needed.

2. Explain the top-down approach?


 The process to solve the problem and how to do it is solved by an approach of structured
programming language, (i.e.) the top-down approach.
 This approach will divide the program into independent task and further those tasks will be
divided into sub-tasks until they are mentally understandable and coded easily.
 These tasks and sub-tasks can be in the form of functions.
 The designing of function proceed from top to bottom.
 This approach will produce a readable modular code, which can be easily understood and
maintained.

Lesson 2 - Programming Languages


I. Fill in the blanks:
1. Machine language consist of two digits ___0___ and ___1___
2. Assembly Language is called the second generation programming language.
3. Machine Language is close to humans.
4. Translator is used to convert ___High-level ___ code into ___low-level___ code.
5. Assembler is used to translate assembly language into machine language.
6. Interpreter translates the program line by line and displays the error.
7. Errors are called bugs.
8. Run time errors occurred during the execution of the program.
II. Answer in short:
1. Name the different types of computer languages?
There are three types of computer languages. They are:
 Machine Language
 Assembly language
 High-Level Language
2. What is a binary language?
The language which consist of two digits 0 (false) and 1(True) is called as Binary Language.
3. Write the advantages of assembly language?
 It is portable language.
 Easily understandable by humans as it uses English Language.
 Less time is required to develop a program
4. What are Errors?
Errors are illegal operations performed by the user while writing a program, which
results in abnormal working of the program. Errors are also called as bugs. Errors occur while the
program is executed or compiled.
5. What are translators?
A translator is used to convert high level source code into lower-level. The program written
in the high-level language is called as source code, and to convert the source code into machine
code, a translator is required.
6. Name the different types of errors?
Errors are classified into three different types. They are:
 Syntax errors
 Logical errors
 Run time errors
7. What is the difference between a compiler and interpreter?
A compiler translates the entire program and displays error in the source program during the
translation whereas the interpreter translates the program line by line and display error, when it is
encountered during translation.

II. Answer the following questions:


1. Explain computer languages.

A language that is used to communicate with the computer to get its work done is called
computer languages. The most popular computer languages are BASIC, FORTRAN, C, C++, Java etc.
There are three types of computer languages. They are:
Machine Language:
This language is known as the first generation of programming languages. The language
which consist of two digits 0 (false) and 1 (True) are called as Binary Language. Machine language is
directly understood by the computer beca8use all the instructions will be in the form of 0 and 1. It is
difficult for the humans to understand.
Assembly Language:
This language is known as the second generation of programming languages or middle level
languages. The instructions and variable will have specific names instead of binary numbers. To
understand the assembly language, the computer needs a translator called Assembler, which
translates the assembly language into machine language. Java

High-Level Language:
These languages are called third generation of programming languages. These languages are
close to humans as they are easily understandable. The programs written in this language are easy
to read, write and maintain. A program written in this language requires software to translate the
high-level language into machine code. This translation can be done by the compiler or the
interpreter.
2. Explain different translators.
A translator is used to convert high level source code into lower-level. The program written in the
high-level language is called as source code, and to convert the source code into machine code, a
translator is required. There are three types of translator:
Assembler:
Assembler is a translator which is used to translate assembly language into machine
language. The output of the assembler is called the object code.

Source Program Assembler Output

Compiler:
Compiler is a translator which is used to translate high-level languages into machine
language. It translates the entire program and displays error in the source program during the
translation.

Source Program Compiler Target Program

Error messages

Interpreter:
Interpreter is a translator which is used to translate high-level languages into low-level
language. It translates the program line by line and display error, when it is encountered during
translation.

Source Program Interpreter Target Program

3. Explain Errors.
Errors are illegal operations performed by the user while writing a program,
which results in abnormal working of the program. Errors are also called as bugs. Errors occur while
the program is executed or compiled. Errors are classified into three different types. They are:
Syntax Errors:
Errors that occur when the rules of the programming language are not followed are
called syntax errors. These errors are detected by the compiler and they are also called compile-time
errors.
Logical Errors:
Errors that occur, when the proper output is not obtained when the input is given
are called logical errors. These types of errors produce incorrect output, but the program appears to
be correct.
Run Time Errors:
Errors which occur during execution of a program are called run time errors. These program
will run with mistakes, but produce enormous results.
Lesson 3 – Overview of C
I. Fill in the blanks:
1. AIGOL was the first modern language and introduced in the year 1960.
2. B language was created by Ken Thompson.
3. ANSI defined the standard of C language.
4. The variables which are declared before main () function are called global variables.
5. Declaration and Executable are two parts of main () function.
6. The smallest individual unit in C language is called C tokens.
7. C language has 32 keywords.
8. Single character constant consists of single character enclosed in single quotes.
9. Values can be assigned to variable using assignment operator.
10. Const keyword is used to declare the value of variable as constant.

II. Answer in short:


1. Who developed C language and in which year?
C language was developed by Dennis Ritchie at AT&T Bell laboratories in the year
1972.
2. Name the two parts of main () function.
The two parts of main () functions are:
 Executable
 Declaration
3. Define character set?
Characters are used to form words, sentences, expressions, numbers etc.¸ depending upon
the requirement.
4. Name the different types of C tokens.
C provides six types of tokens:
 Keywords
 Identifiers
 Constants
 Strings
 Operator
 Special Symbols.
5. What are constants?
Constants are similar to variables but they refer to fixed values that cannot be changes
during the execution of the program. Constants are also known as literals. Const keyword is used to
define the constant.
6. Name the different data types?
Data types are divided into four:
o Integer
o Float
o Char
o Double

II. Answer the following questions:


1. Explain the structure of program and explain it.
The structure of C program is:
Document Section
Link Section
Definition Section
Global Declaration Section
Main ()
{
Declaration part;
Executable part;
}
Subprogram ()
{
Statements;
}
Document Section: This section is used to give the name of the program.
Link Section: This section provides instruction to the computer to link the pre-processor statement in
the library files.
Definition Section: This section defines the symbolic constants or values.
For Example: Define marks 100;
Global Declaration Section: The variable which has to be used in more than one function has tpo be
declared in the global declaration section.
Main (): Main () starts the program. Every C program has one main () function. The program cannot
be written without a main () function.
Main () function has two parts:
o Declaration part: The entire variable which is used in executable part has to be declared in the
declaration part.
o Executable part: The comments given in the executable part are executed when system calls the
main () function.
Subprograms: This section contains all the sub programs which are user defined functions.

2. What are variables? What are the rules to be followed to choose a variable name?
A variable is a name used in the program to store the data values. These values of
variables can be changed during the execution of the program. The variable declared in programs
can be any data type.
The rules to be followed to choose a variable name are as follows:
 Variable name must consist of uppercase letter A-Z, lower case letters a-z, digits 0-9, and
underscore.
 First character must be a letter or underscore.
 Blank spaces are not allowed.
 Special characters like $, # are not allowed.
 Keywords cannot be used as variable names.
 Variables are case sensitive.

You might also like