Download the latest CBSE Class 8 Computer Science Computer Programming Notes in PDF format. These Class 8 Computer Science revision notes are carefully designed by expert teachers to align with the 2025-26 syllabus. These notes are great daily learning and last minute exam preparation and they simplify complex topics and highlight important definitions for Class 8 students.
Chapter-wise Revision Notes for Class 8 Computer Science Computer Programming
To secure a higher rank, students should use these Class 8 Computer Science Computer Programming notes for quick learning of important concepts. These exam-oriented summaries focus on difficult topics and high-weightage sections helpful in school tests and final examinations.
Computer Programming Revision Notes for Class 8 Computer Science
Give brief answers to the following questions.
Question: What is program? Give few examples of programs.
Answer: A set of instructions given to the computer to perform a specific task is called a program. A computer works according to the instruction written in program. Few examples of programs are:
A program to find area of a circle for a gives radius. A program to find sum and average of five values
A program to find the grades of students
A program to find greater of two values
Question: What is the purpose of programming language?
Answer: A programming language is designed to develop programs or instructions to communicate with computer to solve various problems. Programming languages are the means of communication between user and computer.
Question: Differentiate between a constant and variable.
Answer: A quantity whose value cannot be changed during execution of program is called constant. A quantity whose value can be changed during execution of program is called variable. Variables are the named memory locations that can store data and result of processing. Variables give meaningful names to constants.
Question: Differentiate between Syntax error and logical erro
Answer: Syntax error is a type of error that occurs when a program statement does not follow the syntax of programming language. A type of error that occurs due to wrong logic of the program is called logical error.
Question: What are the rules for defining/declaring variables in GW -BASIC?
Answer: Following are the rules for defining/declaring variables in GW -BASIC:
Alphabets and numbers can be used for variables.
The first character of the variable should be an alphabet.
No special symbol is allowed except Underscore ( _ ).
Underscore ( _ ) cannot be used as a first or last character.
Question: Name different types of constants with examples.
Answer: Constants are classified as string constants and numeric constants.
String constants: These are series of alphabetic or alphanumeric character written in double quotation marks. For example “Pakistan” , “Haider” and “H.No.107” et c.
Numeric constants: These are the numbers, for example 15 , 20.50 , -50 etc.
Question: Give the precedence of the arithmetic operators.
Answer: Precedence is the priority that is followed while applying operators in an expression. In other words the order in which operators in an expression are evaluated is known as precedence. It is also known as hierarchy of operators. The precedence of arithmetic operators is given below:
Priority level
Operator
Symbol
Precedence
First
Exponential Operator
^
Highest
Second
Multiplication, Divide
*OR /
Third
MOD Operator
MOD
Fourth
Addition or Subtraction
+ OR –
Lowest
Question: What is the purpose of modulus operator (MOD)?
Answer: Modulus operator is used to get the remainder after division. For example if a = 10 and b = 3 , the MOD operator ( a MOD b) will return 1 after performing division.
Question: What is the purpose of following GW-BASIC commands?
a. LIST
b. RUN
c. LOAD
d. SAVE
Answer:
a) LIST Command: List command is used to display all or specific statements of a program from memory on screen. The shortcut key for list command is F1.
Syntax: LIST [line number][- line number]
Example: LIST it displays al lines of the program.
b) RUN Command: RUN command is used to execute the program that is currently loaded in the memory. The shortcut key for RUN command is F
Syntax: RUN
Example: RUN it runs the program currently in memory.
c) LOAD Command: LOAD command is used to load a saved program file from disk to memory. The shortcut key for list command is F3.
Syntax: LOAD filename
Example: LOAD “Test.bas” it loads the file “Test.bas” in memory.
d) SAVE Command: SAVE command is used store a program from memory to disk permanently. The shortcut key for list command is F4.
Syntax: SAVE filename
Example: SAVE “Test.bas” it stores the file “Test.bas” from memory to disk.
Question: (i) What is arithmetic expression? Explain different types of operators with examples.
Answer: Arithmetic Expression: An expression that consists of different arithmetic operators, variables and constants is called arithmetic expression. It is evaluated by performing arithmetic operation on numeric values. There are three common types of operators.
Arithmetic Operators ( +, -, *, /, ^, MOD)
Assignment Operator (=)
Relational Operators (< , >, , =)
a) Arithmetic Operators: These are use to perform mathematical calculations like addition, subtraction, division, multiplication and exponentiation. Their explanation with examples is as follows:
Operator symbol
Operation
Description
Example
+
Addition
Gives the sum of values
A+B+C, X+50, 67+45
–
Subtraction
Gives the difference of values
X-56, A-C, 80-56
*
Multiplication
Gives the product of values
A*B, Y*50, 45*60
/
Division
Gives the quotient
X/Y, B/40, 125/25
^
Exponentiation
Raise the value to the power of an exponent
A ^ 10, 5^ 2, A^B
MOD
MODULUS
Gives the remainder after division
35 MOD 6, X MOD Y
b) Assignment Operator: An operator which is used to assign a value to a variable is called assignment operator. In programming languages “Equal to sign (=)” is used as an assignment operato For example A=5 , X = A + 2.54 etc.
c) Relational Operators: These are used to perform comparisons on two values. The result of comparison is either true (non zero) or false (zero). Following is their description with examples:
Operator symbol
Operation
Description
Example
=
Equal to
Returns true if the values are equal and false if not
A = B
Not equal to
Returns true if the values are not equal and false if they are equal.
5 7
>
Greater than
Returns true if the first number is greater than second and false if not
15 > 11
Less than
Returns true if the first number is less than second and false if not
7 < 9
>=
Greater than OR equal to
Returns true if the first number is greater than or equal to the second and false if not
(X+1) >= 7
Less than OR equal to
Returns true if the first number is less than or equal to the second and fal se if not
Y
Question: Explain the purpose of the following GW-BASIC statements with their syntax and examples.
a. PRINT
b. INPUT
c. READ and DATA
d. IF-THEN-ELSE
Answer:
a) PRINT Statement: PRINT statement is used to display message or output to the screen.
As shortcut”?” can be used for PRINT command.
Syntax: line number PRINT [string/variables/constants]
String: It indicates the sequence of characters that is displayed on screen.
Variables: It indicates the variables whose values to be displayed on screen. Constants: It indicates the constants to be displayed on screen.
For example: 10 PRINT “I Love India” will print I Love India
10 PRINT X, Y, Z will print values of variables x, Y and Z
10 PRINT 205 , -101 will print constant values 205 and -101
b) INPUT Statement: INPUT statement is used to take input from the user during the execution of the program.
Syntax: line number PRINT [string;] list of variables
String is used to prompt the user to enter the required value using keyboard and it is optional. List of variables is used to store the entered values.
Example: 10 CLS
20 INPUT “Enter a number”, X
30 PRINT “Square of your number is=”, X^2
This program will get value for X from user at execution time and will print its square.
c) READ and DATA Statement: READ/DATA statement is a combination of two statements used together when there is a need to process large number of variables with given data. READ statement defines the list of variables while DATA statement contains constant values for these variables in READ statement. Values in READ and DATA statements should be separated by commas.
Syntax: line number READ list of variables separated by commas.
line number DATA list of constants separated by commas.
Example: 10 READ X, Y, Z, K
20 DATA 8, 9, 13, 15
The above program will specify four variables x, y, z and k and assign them values 8, 9, 13 and 15 respectively. If values in DATA statement are more than variables in READ statement then the extra values are ignored but if the variables in READ statement are more than the values in DATA statement then syntax error encounters i.e. “Out of Data”.
d) IF-THEN-ELSE Statement: IF-THEN-ELSE is a decision making statement, depending upon the condition, it takes some action or changes the order of execution. It helps the computer to check whether a condition is true or false.
Syntax: IF expression/condition THEN statement(s)1 ELSE statement(s)2
If the expression or condition is true then Statement(s)1 will be executed otherwise
Statement(s)2 will be executed.
T
Flowchart:
Condition
Statement (s)
Statement (s)
F
Output:
Enter your marks: 65
You have passed
Example: 10 CLS
20 INPUT “Enter your marks:”; marks
30 IF marks >= 40 THEN PRINT “ You have passed”
40 END Short Questions other than exercise
Question: Explain the use of semicolon with PRINT.
Answer: Two or more variables can be separated in print statement by semicolon. If semicolon is used the second value appears right after the first value. There is no space be tween values.
Example: PRINT “Apple” ; “Mango” ; “Orange”
Output will be as: AppleMangoOrange
Question: Explain the use of comma with PRINT.
Answer: Two or more variables can be separated in print statement by comma. If com ma is used each value is displayed in 14 spaces. A maximum of five values can be printed in single line using commas.
Example: PRINT “Apple” , “Mango” , “Orange”
Output will be as: Apple Mango Orange
Question: What is expression? What are its types?
Answer: An expression is a combination of symbols (operands) and operators that represent a value.
There are two types of expressions:
Arithmetic expression uses arithmetic operators to perform arithmetic calculations.
Relational expression uses relational operators to compare two values.
Question: Define programming.
Answer: Programming is a technique to develop programs. Different programming languages are used to write programs. Simply computer programming is all about developing, implementing and maintaining the programs.
Question: How arithmetic expression can be assigned to a variable?
Answer: An arithmetic expression can be assigned to a variable by using assignment operator (=). The variable is written on the left side of assignment operator and expression is written on right side of assignment operator. First expression is evaluated and result is stored in variable e.g. a = c – d * 10
Question: Differentiate between bug and debugging.
Answer: An error in a program is called a bug. The process of finding and removing errors in a program is called debugging. Errors can be found by testing the program.
Question: Differentiate between save and load command.
Answer: SAVE command is used to store a program from memory to the disk permanently whereas load command is used to load a stored program from disk to memory.
Question: How the commands are differ from statements?
Answer: Commands are key words which are used to issue instructions to the computer to perform specific task. They do not need any line number while statements are instructions for the computer program to perform an action. Each statement is started with a line number. Statements are executed according to line number in ascending order.
Question: Differentiate between string constant and numeric constant.
Answer: The string constant may consist of alphanumeric or numeric data and is written in double quotation marks while numeric constant consists of numeric data i.e. only numbers and is written without quotation marks.
Question: Why variables are used with INPUT statement?
Answer: The variables are used with INPUT statement to store the input data. Two or more variables must be separated by comma.
Question: Write the use of $ in GW-BAS
Answer: A dollar sign $ is used after a string variable name such as A$ and Address$. The dollar sign indicates that the variable contains a string value.
Question: What is the use of arithmetic operators?
Answer: Arithmetic operators are used to perform arithmetic calculations like addition, subtraction, division, multiplication and exponentiation.
Question: What is the use and syntax of CLS command?
Answer: CLS Command: CLS stands for Clear Screen. It is used to clear the contents of the screen.
Syntax: CLS
Question: Define precedence.
Answer: Precedence is the priority that is followed while applying operators in an expression. In other words the order in which operators in an expression are evaluated is known as precedence. It is also known as hierarchy of operators.
Question: Define the syntax of programming language.
Answer: The syntax of programming language is the set of rules that defines the combination of symbols used by that language
Question: What is “Out of Data” error?
Answer: If the variables in READ statement are more than the values in DATA statement then syntax error encounters i.e. “Out of Data”
| CBSE Class 8 Computer Science Advanced PowerPoint Notes |
| CBSE Class 8 Computer Science Audio And Video Conferencing Notes |
| CBSE Class 8 Computer Science Computer Programming Notes |
| CBSE Class 8 Computer Science Downloading Uploading Notes |
| CBSE Class 8 Computer Science Introduction To Computer Security Notes |
| CBSE Class 8 Computer Science Introduction to MS Excel Notes |
| CBSE Class 8 Computer Science Introduction to PowerPoint Notes |
| CBSE Class 8 Computer Science Introduction with Information Technology Notes |
| CBSE Class 8 Computer Science Memory Units and Generations Notes |
| CBSE Class 8 Computer Science Painting Tools In Photoshop Notes |
| CBSE Class 8 Computer Science Photoshop Review Notes |
| CBSE Class 8 Computer Science Problem Solving Notes |
| CBSE Class 8 Computer Science Working with Tables and Mail Merge in MS Word Notes |
Important Practice Resources for Class 8 Computer Science
CBSE Class 8 Computer Science Computer Programming Notes
Students can use these Revision Notes for Computer Programming to quickly understand all the main concepts. This study material has been prepared as per the latest CBSE syllabus for Class 8. Our teachers always suggest that Class 8 students read these notes regularly as they are focused on the most important topics that usually appear in school tests and final exams.
NCERT Based Computer Programming Summary
Our expert team has used the official NCERT book for Class 8 Computer Science to design these notes. These are the notes that definitely you for your current academic year. After reading the chapter summary, you should also refer to our NCERT solutions for Class 8. Always compare your understanding with our teacher prepared answers as they will help you build a very strong base in Computer Science.
Computer Programming Complete Revision and Practice
To prepare very well for y our exams, students should also solve the MCQ questions and practice worksheets provided on this page. These extra solved questions will help you to check if you have understood all the concepts of Computer Programming. All study material on studiestoday.com is free and updated according to the latest Computer Science exam patterns. Using these revision notes daily will help you feel more confident and get better marks in your exams.
You can download the teacher prepared revision notes for CBSE Class 8 Computer Science Computer Programming Notes from StudiesToday.com. These notes are designed as per 2025-26 academic session to help Class 8 students get the best study material for Computer Science.
Yes, our CBSE Class 8 Computer Science Computer Programming Notes include 50% competency-based questions with focus on core logic, keyword definitions, and the practical application of Computer Science principles which is important for getting more marks in 2026 CBSE exams.
Yes, our CBSE Class 8 Computer Science Computer Programming Notes provide a detailed, topic wise breakdown of the chapter. Fundamental definitions, complex numerical formulas and all topics of CBSE syllabus in Class 8 is covered.
These notes for Computer Science are organized into bullet points and easy-to-read charts. By using CBSE Class 8 Computer Science Computer Programming Notes, Class 8 students fast revise formulas, key definitions before the exams.
No, all study resources on StudiesToday, including CBSE Class 8 Computer Science Computer Programming Notes, are available for immediate free download. Class 8 Computer Science study material is available in PDF and can be downloaded on mobile.