Wednesday, December 20, 2023

Model Question Solution Subject: Computer Science

 

Secondary Education Examination

Model Question Solution

Subject: Computer Science

  Time:1:30 hr.                            FM: 50

Group ‘A’ - 10 marks

 

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

a. What is search engine?

Search engine is a web application which allows user to search the content from the internet based in their queries. E.g. Google, Bing

b. What is the business done through the internet?

E-Commerce is the business done through the internet

c. Which data type is used to store numeric characters or special symbols in MS-Access?

“Text” data type is used to store numeric characters or special symbols in MS-Access

d. Which view is used to modify a table in MS-Access?

Design view is used to modify a table in MS-Access.

e. What is Modular Programming?

The process of breaking down a large program into smaller logical and manageable part is called modular programming.

f. Write any two features of C language.

It is structural programming language.

It supports graphics.

 

2. Write appropriate technical term for the following: [2x1 =2]

a. Law that governs the legal issues of cyberspace. [Cyber Law]

b. The smallest unit to represent information on quantum computer. [Quantum Bit]

 

3. Write the full form of the following: [2x1=2]

I. STP: Shielded Twisted Pair

II. WAP: Wireless Application Protocol

 

Group ‘B’ - 24 marks

 

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

a. What is computer network? Enlist any two advantages of it.

A  group of computers interconnected with each other through any medium   using definite rule(protocol) for the purpose of sharing data, information, hardware, software and other resources. The advantages are:

 

Expensive hardware like printer, scanner etc can be shared in a network. So, it is cost effective.

It allows several user to share data in real time.

b. What is computer ethics? Write any two of them.

Computer ethics are the moral code of conduct or set of principles that guides computer user about the wise and safe use of computers and other electronic media. It generally aware computer user from misuse and exploitation of technology.

 

Don’t use computer and internet to commit crime (cyber crime).

Use computer to share and gain knowledge.

 

 

 

c. What is software security? Write any two measures of hardware security.

The protection or securing computer data, information and software from being damaged or lost accidentally or intentionally is known as software security.

 

The two measures of hardware security are:

 

Use power protection device like UPS, volt guard, CVT.

Maintain dust free environment.

d. What is m-Commerce? Write its two important services.

 

M-Commerce refers to Mobile-Commerce which is an extended version of E-Commerce where buying and selling goods, services and information are done through handheld devices like mobile phone, tablets, PDAs etc. E.g. movie tickets, flight ticket. The two important services are:

 

Mobile banking

Hotel Booking

e. What is IoT? Write any two importance of it.

 

IoT (Internet if Things) is the network of real world “Things” (Devices) made with sensors, software, hardware and other various modern technology that can communicate with the user and devices along with its environment. E.g. smart watch, voice assistant, smart car. Its importance are:

 

It increase efficiency and productivity of work.

It helps to automate our daily life work.

 

 

f. What is database ? Give any two examples.

 

The systematic and scientific collection of data that can be retrieved or access whenever required is called database. It is the organized way of collecting and keeping data and information. E.g. Dictionary, Telephone directory, Marks ledger etc.

 

g. What is primary key? List any two advantages of it.

The key or field that is used to uniquely identify records from the database table is called primary key. It must be unique and cannot be kept empty(null value not accepted)

 

Its importance is:

 

It uniquely identifies records.

It prevents duplication of data.

It helps in faster searching of records.

h. What is data sorting? List any two advantages of using it.

 

Arranging data in a particular order of field that may be either ascending or descending is called data sorting. The process of placing elements from a collection in some kind of order is sorting. Its advantages are:

 

Similar data can be grouped together.

It helps in faster searching of data.

i. What types of work is done in MS-Access using Form and query object?

 

Form allows user to enter new data and edit or modify the existing data through user friendly interface.

 

Query allows user to retrieve or access and interpret the information based on the user requirements.

 

5. Write down the output of the given program. Show with dry run in table. [2]

 

DECLARE SUB SHOW (A)

CLS

N = 87

CALL SHOW (N)

END

SUB SHOW (A)

DO

B = A MOD 6 + 3

IF B MOD 4 = 0 THEN

GOTO AA

PRINT B;

AA:

A = A - 10

LOOP WHILE A >= 50

END SUB

 

 

 

 

 

Output is:

6 6

 

6. Re-write the given program after correcting the bugs: [2]

 

REM to add record in an existing file

CLS

OPEN “Record.Dat” FOR OUTPUT AS #1

AA:

INPUT “Enter Name, Class and Roll No. “; Nm$, Cl, Rn

INPUT #2, Nm$, Cl, Rn

INPUT “More records “; Y$

IF UCASE$(Y$) = “Y” THEN

GOTO aa

CLOSE “Record.dat”

END

Program after correcting bugs is:

 

CLS

OPEN “Record.Dat” FOR APPEND AS #1

AA:

INPUT “Enter Name, Class and Roll No. “; Nm$, Cl, Rn

WRITE #1, Nm$, Cl, Rn

INPUT “More records “; Y$

IF UCASE$(Y$) = “Y” THEN

GOTO aa

CLOSE #1

END

 

7. Study the following program and answer the given questions: [2]

OPEN “Detail.dat” FOR INPUT AS #1

OPEN “Temp.dat” FOR OUTPUT AS #2

INPUT “Enter name of the students “; Sn$

FOR I = 1 TO 10

INPUT #1, Nm$, Cl, A

IF Sn$ < > Nm$ THEN

WRITE #2, Nm$, Cl, A

END IF

NEXT I

CLOSE #1, #2

KILL “Detail.dat”

NAME “Temp.dat” AS “Detail.dat”

END

 

What is the main objective of the program given above?

The main objective of given program is to delete the record associated with the name entered by the user.

 

Do you get any problem in the above program if “Kill” statement is removed? Give reason.

Since, KILL statement will delete datafile named “detail.dat”, if we removed KILL the new data file “temp.dat” will be not renamed as “detail.dat”

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Group 'C' [4x4=16]

 

8. Convert / calculate as per the instruction: [4]

 

(11001101)2 = (?)16

(524)10 = (?)2

(1010)2 x (110)2 – (1011)2 = (?)2

(10110)2 ÷ (101)2

 

https://readersnepal.com/storage/post-images/xGO86f41Z3AiDlxYdqKUNq6JQa5EeqrJnIoYR3Z4.jpeg

 

9. a. Write a program in QBASIC that asks length, breadth and height of room and calculates its area and volume. Create a user-defined function to calculate area and sub-program to calculate volume. Hint: [A = LxB], [V = LxBxH] [4]

 

DECLARE FUNCTION area(l, b)

DECLARE SUB volume(l, b, h)

CLS

INPUT “Enter length breadth and height”, l, b, h

x=area(l, b)

PRINT “Area is”; x

CALL volume(l, b, h)

END

FUNCTION area(l, b)

a=l*b

area=a

END FUNCTION

SUB volume(l, b, h)

v=l*b*h

PRINT “Volume is”; v

END SUB

b. A sequential data file called “Record.txt” has stored data under the field heading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose gender is ‘F' and obtained marks in computer is more than 90. [4]

 

OPEN “Record.txt” FOR INPUT AS #1

CLS

PRINT “Roll No”, “Name”, “Gender”, “English”, “Nepali”, “Maths”, “Computer”

WHILE NOT EOF(1)

                INPUT #1, r, n$, g$, e, n, m, c

                g$ = UCASE$(g$)

                IF g$ = “F” AND c>90 THEN

                                PRINT r, n$, g$, e, n, m, c

                END IF

WEND

CLOSE #1

END

 

 

 

10.  Write a program in C language that asks a number and check whether it is odd or even. [4]

 

#include

int main( )

{

                int n, a;

                printf(“Enter any number”);

                scanf(“%d”, &n);

                a = n%2;

                if (a == 0)

                {

                                printf(“%d is even”, n);

                }

                else

                {

                                printf(“%d is odd”, n);

                }

                return 0;

}

 

OR

 

Write a program in ‘C' language to display the series with their sum. 1,2,3,4,….., up to 10th terms.

 

#include

int main( )

{

                int i, s=0;

                for(i=1; i<=10; i++)

                {

                                printf(“%d”, i);

                                s = s+i;

                }

                printf(“Sum is %d”, s);

                return 0;

}

Computer Science – Grade 10 (SEE) 2077BS

 

Computer Science – Grade 10 (SEE) 2077BS
Theoretical Question Pattern (50 Marks)
Time: 1 hr 30 Minutes

Group “A” [10 Marks]

1.                   Answer the following questions in one sentence: (6*1=6)

a.                   Computer Fundamentals

b.                   Computer Fundamentals

c.                   Database

d.                   Database

e.                   QBASIC Programming

f.                    C Programming

2.                   Technical Terms (2*1=2)

a.                   Computer Fundamentals

b.                   Computer Fundamentals

3.                   Full forms (2*1=2)

a.                   Computer Fundamentals

b.                   Computer Fundamentals

Group “B” [24 Marks]

4.                   Answer the following questions: (9*2=18)

a.                   Computer Fundamentals

b.                   Computer Fundamentals

c.                   Computer Fundamentals

d.                   Computer Fundamentals

e.                   Computer Fundamentals

f.                    Database

g.                   Database

h.                   Database

i.                    Database

5.                   QBASIC Output finding with Dry Run - 1*2=2

6.                   QBASIC Program Correction (Debugging) - 1*2=2

7.                   QBASIC Analytical Questions - 2*1=2

 

Group “C” [16 Marks]

 

8.                   Number System (Conversion / Calculation) - 4*1=4

9.                   QBASIC Program Writing

a.                   Sub and Function Procedure - QBASIC - 1*4=4

b.                   File Handling in QBASIC - 1*4=4

10.               C Program Writing (if statement or Looping)-1*4=4


Monday, December 4, 2023

QBASIC programs for Grade 9 (A complete List)

Write a QBASIC Program :

1 Add two numbers.


2.    Subtract two numbers.


3.    Multiply two numbers.


4.    Divide two numbers.


5.    Average of two/ three numbers.


6.    Calculate Simple interest.


7.    Swapping two numbers.


8.    Calculates area of different Shapes.


9.    Calculate the volume of different shapes.


    Adding two string values.


11Converting the temperature of one form to another.


12To calculate the total, percentage of the student by entering the marks obtained in the all subjects.


13To check the number is odd or even.


14To check the result of student in grade point by entering the marks of any subject.


15To check greater / smaller number among two numbers.


16To find greatest/ smallest number among three numbers.


17Calculate the commission earned by a salesman from the listed commission percentages category.


18Find the day of week by entering the number between 1-7.


19Display the natural numbers for 1 to 50 in vertical/horizontal order.


20To print the string multiple times.


2   To display the series of numbers

            20 18 16 ......... 2


22. To display the multiplication number of any specific number.


23. To Display the series of number:

            525,500,475.... 15th term.


24To display the numeric pattern as                           

                                        2, 22, 222, 2222.... 7th term.


25To display the series of number                              

                                        1  4  7 ........ 12th term.


 To display odd numbers between  1 to 10 and their sum.


27TO display following pattern:

8

88

888

8888

88888

888888


28 TO display following pattern:

1

12

123

1234

12345


29To display odd numbers between 1 to 50.


30To display the even numbers between 1 to 50.


31Check whether the number is perfectly divisible by 5 or not.


32To display the squares of 1 - 10.


33To check whether the entered number is perfect square or not.


34To input any number and display the multiplication table of that number.


35To input cost price and selling price and determine whether there is profit or loss.


36Draw flowchart and write the algorithm for the QN 2, 4, 6, 13.


37What do you mean by SDLC? List its phases.


38Write the Basic HTML syntax.


39Write the HTML code for describing the heading tags.


40Write 1/1 example for LEFT$  and RIGHT$ .

 

*****