Monday, December 25, 2023

SOLVED ROSEBUD SCHOOL Buddhanagar, Kathmandu PRE-SEND UP EXAMINATION-2080 Subject: Computer Science

 






ROSEBUD SCHOOL

Buddhanagar, Kathmandu

PRE-SEND UP EXAMINATION-2080

Subject: Computer Science

Time: 02:00 hrs

Full Marks: 50

Class: X (Ten)                                                                                                                       Pass Marks: 20

 

Group "A" [10]

 

1. Give answer in one sentence for the following questions: [6×1=6]

 

a. Define bandwidth.

Ans: The amount of data that can be carried from one point to another in a given time period is called bandwidth.

 

b. What is digital footprint?

Ans: Digital footprint is a trace of data that is created while using the Internet

 

c. Which data type of MS Access is used for data that can store only one of two possible values?

Ans: The data type that can store only one of two possible values is Yes/No.

 

d. List the importance of primary key.

Ans: The importance of primary key are

i) To reduce and control duplication of record in a table.
ii) To set the relationship between tables.

 

e. What are parameters?

Ans: Parameters are variables that will receive data (arguments value) sent to the procedures (SUB program and FUNCTION). Formal parameters are called parameter.

 

f. What are data types used in c programming?

Ans: The data types used in c programming are int, char, float and double.

 

2. Write appropriate technical terms for the following:  [2×1=2]

 

a. The method by which information is converted into secret code that hides the information's true meaning. Encryption

 

b. Hacking done with permission from the client. Ethical Hacking

 

3. Write the full forms of the following: [2×1=2]

 

a. ASCII - American Standard Code for Information Interchange

b. BIOS - Basic Input Output System

 

 

 

Group "B" [24]

 

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

 

a. What is search engine? Name any two popular search engines.

Ans: A search engine is a powerful tool that helps to find information on the internet using keywords or phrases.

Any two popular search engines are Google and Bing

 

b. Define social media. Give example of it.

 

Ans: Social Media is an online tool that helps to create, share, and exchange content, ideas, and information with the whole world. Examples of social media are facebook, instragram, twitter and youtube.

 

c. What is key logger?

Ans: A keylogger is a type of spyware that can be used to record or track the keystrokes made by a user on a keyboard.

 

d. Write any four preventive measures for computer hardware security.

Ans: Any four preventive measures for computer hardware security are:

a)     Regular Maintenance

b)     Insurance

c)     Air condition system

d)     Power Protection device (Volt guard, Spike guard, UPS)

 

e. What is m-commerce? Write its two important services.

Ans: M-Commerce refers to the process of buying and selling of goods and services through wireless handheld devices such as smartphones, tablets or personal digital assistants (PDAs).

Any two important services of m-commerce are:

Mobile Shopping: M-commerce enables users to browse, select, and purchase products or services directly from their mobile devices like daraz, hamrobazar, amazon etc.

Mobile Payments: This service involves making payments using mobile device like e-sewa, khalti

 

 

f. What is cyber crime? Give any two examples.

Ans: Cybercrime refers to criminal activities or illegal actions that are conducted or facilitated through the use of digital technology or the internet.

Any two examples of cyber crime are: Software piracy, hacking

 

g. What is database management system? Give any two examples.

Ans: DBMS is a software that manages databases, allowing users to store, access, and manipulate data in an organized and secure way. Any two examples are MS-Access and Oracle,

 

h. What is form? Write its uses.

Ans: Form is a database object that provides a graphical interface for users to view, enter, and edit data from one or more tables, queries, or other data sources.

The uses of forms are:

Forms provide an easy-to-use interface for data entry and manipulation, improving data accuracy and completeness.

Forms enable users to customize the look and feel of data input screens

 

i. What is data sorting? Write any two importance of it.

Ans: Sorting refers to the process of organizing data in a specific order (ascending or descending) based on one or more fields in a table, query, or report.

Any two importance of sorting are:

Sorting helps to organize data and make it easier to find and retrieve specific information.

Sorting can save time and improve efficiency by allowing users to quickly access the data they need

 

 

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

 

            DECLARE SUB SERIES ( )

            CALL SERIES

            END

           

            SUB SERIES

            A = 1

            FOR I = 1 TO 5

                        PRINT I * A

            A = A+ (10 ^ I)

NEXT I

END SUB

 

Dry Run

A

I=1 to 5

PRINT I * A

A= A+ (10 ^ I)

1

1

1*1 =1

1+(10^1)=11

11

2

2*11=22

11+(10^2)=111

111

3

3*111=333

111+(10^3)=1111

1111

4

4*1111=4444

1111+(10^4)=11111

11111

5

5*11111=55555

11111+(10^5)=111111

111111

6 [Loop Exits]

 

 

 

The output of the program is

1

22

333

4444

55555

 

5. Re-write the given program after correcting the bugs.

 

REM Program to generate 2, 2, 4, 6, 10 up to 10th term

DECLARE SUB FIBO ( )

CLS
EXECUTE FIBO

END

 

SUB FIBO

A = 2

B = 2

FOR ctr = 5 to 1

DISPLAY A; B;

A = A + B

B = A + B

NEXT ctr

END FUNCTION

 

Debugged Program

 

REM Program to generate 2, 2, 4, 6, 10 up to 10th term

DECLARE SUB FIBO ( )

CLS
CALL  FIBO

END

 

SUB FIBO

A = 2

B = 2

FOR ctr = 5 to 1 STEP -1

PRINT A; B;

A = A + B

B = A + B

NEXT ctr

END SUB

 

7. Study the following program and answer the given questions. [2×1=2]

 

DECLARE SUB TEST (A, B)

CLS

X= 7

Y = 5

CALL TEST (X, Y)

END

 

SUB TEST (A, B)

FOR I = A to B STEP -1

A = A+ B

B = B + A

NEXT I

END SUB

 

 

a. List the formal parameter and argument.

Ans: Formal parameters are  A and B

            Arguments are X and Y

 

b. Which loop is used in the above program?

Ans: FOR……NEXT loop is used in the above program.

 

Group "C" [44-16]

 

8. Convert/calculate as per the instructions:

a. (BCD)16 into Binary

 

b. (546)8 into decimal

 

c. (101101-11001×101)

 

d. (10110¸101)

 

 

a. Write a program in QBASIC that allows user to enter a number and check whether the given number is prime or composite using sub procedure and check given number is even or odd using function procedure [4]

 

DECLARE SUB PRIME (N)

DECLARE FUNCTION CHECKPO$ (N)

CLS
INPUT “Enter any number”; N

CALL PRIME (N)

PRINT “The given number is”; CHECKPO$(N)

END

 

SUB PRIME (N)

C = 0

FOR I = 1 TO N

IF N MOD I = 0 THEN C = C + 1

NEXT I

IF C = 2 THEN

PRINT "PRIME NUMBER"

ELSE

PRINT "COMPOSITE NUMBER"

END IF

END SUB

 

FUNCTION CHECKPO$ (N)

IF N MOD 2 = 0 THEN

CHECKPO$ = “EVEN NUMBER”

ELSE

CHECKPO$ = “ODD NUMBER”

END IF

END FUNCTION

 

 

Write QBASIC program to delete some records from "rec.txt file where computer ask user to enter the name to be deleted. Fields are name, address and age. [4]

 

OPEN “rec.txt” FOR INPUT AS #1

OPEN “temp.dat” FOR OUTPUT AS #1

CLS

INPUT “Enter name which is to be deleted”; D$

WHILE NOT EOF(1)

INPUT #1, N$, A$, AG

IF UCASE$(D$)<>UCASE$(N$) THEN

WRITE #2, N$, A$, AG

ELSE

PRINT “Deleted data=”; N$, A$, AG

END IF

WEND

CLOSE #1, #2

 KILL “rec.txt”

NAME “temp.dat” AS “rec.txt”

END

 

Write C program to input a multi-digit number and calculate the sum of its individual digits.

 

 

#include <stdio.h>

int main() {

  int n, s = 0, r;

  printf("Enter a number: ");

  scanf("%d", &n);

  while (n != 0)

{

    r= n % 10;

    s=s+r;

    n =n / 10;

  }

  printf("The sum of the digits is: %d\n", s);

  return 0;

}

 

OR

 

 

Write C program that input a number and check whether it is even or odd. (4)

 

#include<stdio.h>

#include<conio.h>

int main()

{

int n;

printf("Enter any number: ");

scanf("%d", &n);

if(n % 2= = 0)

printf("%d is even number", n);

else

printf("%d is odd number", n);

return 0;

}

 

 

The End

 

 


 

Solved PABSON, Kathmandu SEE PRE-QUALIFYING EXAMINATION-2080 Subject: Opt. II Computer Science





 PABSON, Kathmandu

 

SEE PRE-QUALIFYING EXAMINATION-2080

 

Subject: Opt. II Computer Science

 

Full Marks: 50

 

Class: 10

 

Time: 2 hrs.

 

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

 

Attempt all questions.

 

(Group 'A' 10x1=10)

 

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

 

a) What are data communication mode?

Ans: Data communication modes refer to direction of  data flow between devices in a network or communication system. Simplex, Half Duplex and Full Duplex mode are the types of communication mode.

 

b) What is e-governance?

Ans: E-Governance refers to the use of the digital technology by government to enhance the delivery of public services and engage with citizens more effectively.

 

c) List some points about how we can protect our data.

Ans: Antivirus software can detect and remove virus from the computer.

Software for backup helps in securing the information by keeping backup.

 

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

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

 

e) What is the use of EOF() function?

Ans: EOF() function is used to test the end of records with in a file.

 

f) Write the features of C language.

Ans: The features of C language are:

It is a high level language with some features of low level language.

It is mostly used to prepare system software.

 

 

2. Write appropriate technical term for the following:    (2×1=2)

 

a) A device that controls two dissimilar networks. Gateway

 

b) A program that destroys other programs. Computer Virus

 

3. Write the full form of the following:                               (2×1=2)

 

a) G2B - Government-to-Business

 

b) FTP - File Transfer Protocol

 

 

 

(Group 'B')

 

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

 

a) Classify computer network on the basis of geographical location and explain it.

Ans: Computer network can be classified on the basis of geographical location are LAN, MAN and WAN.

LAN (Local Area Network)

Local Area Network is a network that connects a group of computers in a small geographical area like a room, a building, school, etc. Computer lab networking and cyber networking are examples of LAN.

MAN (Metropolitan Area Network)

Metropolitan Area Network (MAN) is a network of computer spread over a city or town located in the same geographical area . Cable TV network and branches of banks are examples of MAN.

WAN (Wide Area Network)

A wide area network (WAN) is a computer network that covers a large geographical area comprising a region, a country, a continent or even the whole world . Internet, 4G Mobile Broadband Systems and satellite communication are the best examples of WAN.

 

 

b) What is cybercrime? Write two examples of cybercrime.

Ans: Cybercrime refers to criminal activities or illegal actions that are conducted or facilitated through the use of digital technology or the internet.

Any two examples of cyber crime are: Software piracy, hacking.

 

c) Mention the benefits and limitation of E-Commerce.

Ans: The benefits of E-Commerce are:

It makes buying/selling possible 24/7.

It makes buying selling procedure faster, as well as easy to find products.

The limitations of E-commerce are:

Need to be careful about the quality of product and service delivery.

We cannot do any transaction without Internet access device.

 

 

d) What is biometric verification?

Ans: Biometric verification is a method of confirming an individual's identity by analyzing and measuring unique physical or behavioral characteristics like fingerprints, facial patterns and voice

 

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

Ans: IoT is a technology that connects all electronic devices together and prompts them to exchange information without any human intervention.

Any two importance of Iot are:

It reduces the human effort, so it saves a lot of time. 

Information is easily accessible from any place at any time on any device.

 

f) What is database? Give some example of database.

Ans: Database is an organized collection of related data that is designed to efficiently store, manage and retrieve
organized information for multiple purposes.

E.g. Dictionary, Marks Ledger, Telephone Directory Encyclopedia, etc.

 

g) What is query? List the different type of query.

Ans: Query is an object of Ms-Access that is used to view, retrieve, change and analyze records from a table or multiple linked tables bases on a specified condition.

The different types of query are:

i) Select query             ii) Action query
In action query, we have update query, append query, delete query and make-table query.

h) List any two major differences between forms and reports.

Ans: Any two major differences between forms and reports are:

Form

Report

Form is primarily used for entering data.

Report is used for presenting and printing the data.

Data can be modified through the form

Data cannot be modified through report.

 

 

i) What is a data type? List any four data types used in MS-Access.

Ans: Data type is an attribute for a field that determines the type of data that can be stored in that field.

Any four data types used in MS-Access are: text, memo, date/time and currency.

 

5. Write down the output of the given program. \Show with dry run in table.              (2)

 

DECLARE SUB PATTERN(SS)

 

CLS

B$="PROGRAM"

CALL PATTERN(B$)

END

 

SUB PATTERN(S$)

 

H=LEN(S$)

I=10

FOR J=1 TO H STEP 2

H=H-2

PRINT TAB(I); MID$(S$,J,H)

I=I+1

NEXT J

END SUB

 

B$

S$

H

I

J=1 to 7 step 2

PRINT TAB(I);

MID$(S$,J,H)

PROGRAM

PROGRAM

7

10

1

MID$(S$,1,5)

PROGR

 

 

5

11

3

MID$(S$,3,3)

OGR

 

 

3

12

5

MID$(S$,5,1)

G

 

 

1

13

7

MID$(S$,7,-1)

-

 

 

-1

14

9 [Loop Exits]

 

 

The output of the program is:

            PROGR

               OGR

                  G

 

 

 

 

 

 

 

6. Re-write the given program after correcting the bugs: (2)

 

REM to count total no. of passed student

WHILE NOT EOF()

OPEN "pab.txt" FOR OUTPUT AS#1

INPU T#2,ID,M1,M2,M3

IF M1>=32, M2>=32, M3>=32 THEN

X=X+1

END IF

WEND

PRINT "TOTAL RECORD";X

END

 

Debugged Program

 

REM to count total no. of passed student

OPEN "pab.txt" FOR INPUT AS #1

WHILE NOT EOF ( 1 )

INPUT #1, ID, M1, M2, M3

IF M1>=32 AND M2>=32 AND M3>=32 THEN

X=X+1

END IF

WEND

PRINT "TOTAL passed RECORD";X

CLOSE #1

END

 

 

7. Study the following program and answer the given questions:

 

DECLARE SUB FACTORS(N)

N=10

CALL FACTORS(N)

END

 

SUB FACTORS(N)

FOR J=1 TO N

R=N MOD J

IF R=0 THEN PRINT J;

NEXT J

END SUB

 

Questions:

a) Write down the use of MOD in the program.

Ans: The use of MOD in the program  is to determine the remainder of a division operation.

 

b) How many time the loop executes in the above program?

Ans: The loop executes 10 times in the above program.

 

(Group 'C)

 

8. Convert/calculate as per the instruction:

 

i). (101011+1101)-(10011)

 

ii) (11011×11)¸(101)

 

iii) (235)10 into octal

 

iv) (9A5)16 into binary

 

9.a) Write a program in QBASIC that asks two numbers to find sum of squares of two numbers using SUB....END SUB program and average of two numbers using FUNCTION...END FUNCTION.

 

DECLARE SUB SQU(A, B)

DECLARE FUNCTION AVG(A, B)

CLS

INPUT “Enter first number”; A

INPUT “Enter Second number”; B

CALL SQU(A,B)

PRINT “Average of two numbers=”; AVG(A, B)

END

 

SUB SQU(A, B)

S=A^2 + B^2

PRINT “Sum of squares of two numbers=”; S

END SUB

 

FUNCTION AVG(A, B)

AVG=(A+B)/2

END FUNCTION

 

 

b) Write a program to open data file tmp.dat which may contain name, address, phone no. and salary. The program should allow user to add few records on it. (4)

 

OPEN “tmp.dat” FOR APPEND AS #1

DO

CLS

INPUT “Enter name”; N$

INPUT “Enter address”: A$

INPUT “Enter phone number”; P

INPUT “Enter salary”; S

WRITE #1, N$, A$, P, S

INPUT “Do you want to add more records(Y/N)”; CH$

LOOP WHILE UCASE$(CH$) = ”Y”

CLOSE #1

END

 

10. Write a program in 'C' to check whether a number is odd or even. (4)

 

#include<stdio.h>

#include<conio.h>

int main()

{

int n;

printf("Enter any number: ");

scanf("%d", &n);

if(n % 2= = 0)

printf("%d is even number", n);

else

printf("%d is odd number", n);

return 0;

}

 

 

 

or

 

Write a program in 'C' language to find sum of first ten natural numbers.

 

#include <stdio.h>

int main()

{

   int i, sum = 0;

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

       sum += i; 

   }

 

   printf("The sum of first ten natural numbers is: %d ", sum);

 

   return 0;

}