Friday, July 15, 2022

SOLVED PABSON, Kathmandu COMPUTER SCIENCE - FIRST TERMINAL EXAM-2079 - CLASS 9

 

SOLVED PABSON, Kathmandu  COMPUTER SCIENCE - FIRST TERMINAL EXAM-2079   - CLASS 9 

PABSON, Kathmandu

FIRST TERMINAL EXAM-2079

 

Computer

Class: 9 Full Marks: 50

 

Time: 1 hrs. 30mins.

Candidates are required to write their answers according to the instructions given.

 

Attempt all questions.

Group ‘A’ —[10Marks]

 

1.  Answer the following questions in one sentence. [6x1=6]

 

a)  Write any two main characteristics of Computer.

Any two main characteristics of Computer are speed and accuracy.

 

b)  Define the term GIGO.

An error due to wrong instructions and data is known as Garbage in Garbage out (GIGO).

 

c)   List the basic architecture of computer system.

The basic architecture of computer system are Input Unit, Output Unit, Storage Unit, Arithmetic Logic Unit, and Control Unit

 

d)  Why computer is called versatile machine?

Computer is called versatile machine because it is used in almost all the fields for various purposes.

 

e)   Draw any two symbols used in flowchart.



)    What is keyword in QBASIC programming language?

Keywords are those words which have special meanings in QBASIC.

 

2.   Write the technical term for the following statements. [2x 1=2]

 

a)       The component of CPU which performs arithmetic and logical operations. ALU

b)       Step by step finite instructions written in English language to solve a particular problem. Algorithm

 

3.   Write the Full Forms of the following: [2x1=2]\

 

a) DVD : Digital versatile disk

b) SDLC : Software Development Life Cycle 

 

Group ‘B’ —[24 Marks]

4.   Answer the following questions: (9x2=18]

 

a)       How is computer used in education? Describe.

Computer is an effective tool which can be used for teaching and learning, result processing, student data processing, question preparation, handouts and note preparation etc. Computers are also used for online education.

 

b)      What is microcomputer? List some examples.

A microcomputer is defined as a small personal computer in which the microprocessor is the central processor. Eg. Desktop computer, Laptop, Smartphones, Tablet etc.

 

c)        Explain memory unit in computer system.

Memory unit is a component of a computer system. It is used to store data, instructions and information. It is actually a work area of computer, where the CPU stores the data and instruction. It is also known as a main/primary/internal memory.

 

d)       What is input and output device? List some example.

An input is a hardware device connected to the computer system that sends out data to the computer to process it and controls the signals. Some typical examples for input devices in a computer are touch screen, mouse, keyboard. 

An output device is a hardware component used to receive data such as text, graphics, tactile, audio/ video and so on from the computer to conduct a task. The output devices reproduce, interpret or display the results of processing the data. Examples of output devices include a printer, a monitor, speakers and so on. 

 

e)       What is system design in SDLC?

After analysing the problem, the developer needs to develop different solutions to solve the problem and select the best one. After selecting the solution, the developer needs to design a solution using any programming tools. Two important tools to design a solution are Algorithm and Flowchart. These tools are called problem-solving tools that help the programmer to understand the program logic and find the solution.

 .

f)         What is Q-basic? What are the features of Q-basic?

QBASIC (Quick Beginner’s All-purpose Symbolic Instruction Code) is a high-level programming language developed by Microsoft Corporation in 1985. It is a modular programming language, where program is divided into different modules or procedure.

the features of Q-basic are:

It is simple and easy to learn.

It has dynamic program debugging.

 

g)        What is variable and constant in Q-Basic programming?

A variable is the location or address where the values are kept and values changes during the execution of a program.

Constants are values which remains fixed during the execution of a program.

 

 

 h) What is pseudo code in programming concept? Explain.

Pseudocode is defined as a method of describing a process or writing programming code and algorithms using a natural language such as English. The purpose of using pseudocode is to provide a clear and concise description of the steps that will be taken in a process or algorithm without the need for specific syntax or code. It is like a rough draft of a program or an algorithm before it is implemented in a programming language. It can also be referred to as 'false code' or 'representation of code'.

 

i) What is the function of IF...then statement in Q-basic. Explain along with syntax.

The function of IF...then statement in Q-basic is to execute a block of statements based on the evaluation of an expression that must be true.

Syntax:

IF Boolean expression THEN

[statement block]

END IF

- statement block consists of any number of statements on one or more lines.

 

 

5. Write the output of the given program:

A=2

WHILE A <= 12

IF A MOD 4 =0 THEN

S=S+A

END IF

A=A + 1

WEND

PRINT S

END

Dry Run

Variable

Condition Check

Statement Check

Variable

Output

A

A<=12

A MOD 4 = 0

S = S+A

 

2

2<=12 Yes

2 MOD 4= 0  ?

2=0 No

 

 

3

3<=12 Yes

3 MOD 4 = 0 ?

3=0 No

 

 

4

4<=12 Yes

4 MOD 4 = 0 ?

0=0 Yes

0+4=4

 

5

5<=12 Yes

5 MOD 4 = 0 ?

1=0 No

 

 

6

6<=12 Yes

6 MOD 4 = 0?

2 = 0 No

 

 

7

7<=12 Yes

7 MOD 4=0?

3=0 No

 

 

8

8<=12 Yes

8 MOD 4=0?

0=0 Yes

4+8=12

 

9

9<=12 Yes

9 MOD 4=0?

1=0 No

 

 

10

10<=12 Yes

10 MOD 4=0?

2=0 No

 

 

11

11<=12 Yes

11 MOD 4=0?

3=0 No

 

 

12

12<=12 Yes

12 MOD 4=0?

0=0 Yes

12+12=24

24

13

13<=12 No

Loop Exits

 

 

 

 

Output

24

 

2.  Debug the following program: [2]

 

REM to find reverse of a number

CLS

INPUT “Enter a number”; n

WHILE n=0

R= n MOD 10

Rev=Rev*10 +R

n=n/10

NEXT

DISPLAY “the reverse is “; Rev

END

 

Debugged Program:

REM to find reverse of a number

CLS

INPUT “Enter a number”; n

WHILE n < > 0

R= n MOD 10

Rev=Rev*10+R

n=n  \ 10

WEND

PRINT “the reverse is “; Rev

END

 

Read the following program and answer the given questions: [2]

 

CLS

A=10

For X= 1 to 10

PRINT A;

A=A+2

Next X

END

 

g)   How many times the loop is executed?

The loop executes 10 times.

 

 

h)  Write the arithmetic operator used in the above program?

The arithmetic operator used in the above program is “ + “

 

Group ‘C’ —[16 Marks]

 

 8. Write an algorithm to find the simple interest.

Step 1 : START 

Step 2 : Read the values of variable  p ( principal ) , n ( Number of years ) , r ( Rate of Interest ) .

Step 3 : calculate the values of  “ si = ( p * n * r )/100 “ .

Step 4 : Display si ( simple interest ) .

Step 5 : STOP 

 

3. Draw the flowchart to find the largest among three numbers. . [4]

 

 

 

 


 

 

 

 

 

4. Write a program to print smallest number among three input numbers. [4]

 

CLS

INPUT “ENTER ANY THREE NUMBERS”; A, B, C

IF A < B AND A < C THEN

PRINT “The smallest number is”; A

ELSEIF B < A AND B < C THEN

PRINT “The smallest number is”; B

ELSE

PRINT “The smallest number is”; C

END IF

 END

 

 

 

 

 

 

 

5. Write a program to find the area of the circle in Q-basic. [hint: A=3.14*R*R] [4]

 

REM PROGRAM TO DISPLAY AREA OF CIRCLE

CLS

INPUT “ENTER RADIUS”; R

A = 3.14 * R ^ 2

PRINT “AREA OF CIRCLE ”; A

END

 

OR

Write a pride in Q-Basic that checks whether a number is divisible by 5 or not.

 

REM

CLS

INPUT “ENTER ANY NUMBER”; N

IF N MOD 5 = 0 THEN

PRINT “ THE GIVEN NUMBER IS DIVISIBLE BY 5”

ELSE

PRINT “ THE GIVEN NUMBER IS NOT DIVISIBLE BY 5”

END IF

END

 

No comments:

Post a Comment