Monday, January 27, 2025

SOLVED PABSON Kathmandu COMPUTER SCIENCE MID TERMINAL EXAMINATION-2081 [SET B]


 

2081-06-18

SOLVED

PABSON Kathmandu

MID TERMINAL EXAMINATION-2081 [SET B]

Subject: Opt. II Computer Science                                                                                     Full Marks: 50

Class: 10                                                                                                                                 Time: 2 hrs.

 

Candidates are required to answer the questions in their own way words as far as practicable. Figures in the margin indicate the full marks.

 

Attempt all questions.

 

Group 'A'(10 Marks)

 

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

 

a) Give any two examples of simplex mode of data communication

Ans: any two examples of simplex mode of data communication are: newspaper and radio.

 

b) What is hardware security?

Ans: Hardware security refers to the protection of the physical components of a computer or electronic device from unauthorized access, theft, or damage.

 

c) What is primary key?

Ans: A primary key is a unique field in a database table that identifies each record uniquely.

 

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

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

 

e) What is modular programming?

Ans: Modular programming is a technique which divides program into many small logical, manageable and functional modules or blocks.

 

f) What are parameters in QBASIC?

Ans: Parameter are variables which are used to specify or declare types of data to be passed to the procedure either sub or function.

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

 

a) The very first page of every websites. Home Page

b) Online transaction through mobile phones. M-Commerce

 

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

 

a) ARPANET – Advanced Research Projects Agency

b) PDF – Portable Document Format

 

Group 'B' (24 Marks)

 

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

 

a) What is peer to peer network model?

Ans: A peer-to-peer (P2P) network is a type of network where each computer or device (peer) can act as both a client and a server.

b) What is cyber-crime? Give few examples of it.

Ans: Cyber-crime refers to illegal activities committed through the use of computers and Internet.

Examples of cyber crime are hacking, phishing, cyber bullying etc.

 

c) Write the importance of UPS in computer system.

Ans: The importance of UPS in computer security system is that it controls fluctuation of electric voltage and provides enough backup electric power to the computer system when there is power failure.

 

d) Write down the advantages and disadvantages of e-commerce.

Ans: Advantages of e-commerce:

  • Faster buying/selling procedure, as well as easy to find products.
  • There are no geographical limitations, can deliver service globally.

Disadvantages of e-commerce:

  • Lack of personal touch. We cannot touch the goods physically.
  • We cannot do any transaction without Internet access device. So, it is heavily dependent on Internet technologies.

 

e) Define e-governance. List out the models of e-governance.

Ans: E-governance is a set of services provided by the government to public via electronic media especially using Internet.

The models of e-governance are:

  • Government-to-Citizen(G2C)
  • Government-to-business (G2B)
  • Government-to-Government (G2G)

·       Government-to-Employee (G2E)

 

f) What is data types? List any four important 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 important data types used in MS-Access are : text, memo, number and currency.

 

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

Ans: The process of arranging all the records in a table either ascending or descending order based on field or fields is known as sorting.

Any two advantages of using it 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.

 

h) Give the differences between select query and action query?

Ans: The differences between select query and action query are:

Select Query

Action Query

Select query is simply used to select and display the relevant data from the database.

An action query is a query that makes changes to or removes many records in just one operation.

It does not make change to database.

It makes change to database.

 

i) What is form in MS-Access? Write any two advantages of it.

Ans: Form is one of the MS-Access database objects which provides graphical interface to view, modify and add data in a table or multiple linked tables.

Any two advantages of form are:

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

·       Forms can include validation rules to ensure data quality and prevent errors.

 

 

 

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

 

DECLARE SUB RESULT(S$)

S$ =" SCIENCE"

CALL RESULT(S$)

END

SUB RESULT(S$)

B=LEN(S$)

C=1

WHILE C<=B

X$=X$+(MID$(S$,C,1)

C=C+2

WEND

PRINT X$

END SUB

 

 

Dry Run in Table:

S$

B=LEN(S$)

C

C<=B?

X$=X$+(MID$(S$,C,1)

C=C+2

PRINT X$

SCIENCE

7

1

1<=7 yes

S

1+2=3

 

 

 

3

3<=7 yes

S+I=SI

3+2=5

 

 

 

5

5<=7 yes

SI+N=SIN

5+2=7

 

 

 

7

7<=7 yes

SIN+E=SINE

7+2=9

 

 

 

9

9<=7 no

Loop exits

 

 

SINE

 

 

 

 

 

 

 

 

The output of the program is:

SINE

 

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

REM To check the supplied no. is odd or even

DECLARE FUNCTION Check$ (X)

CLS

ACCEPT “ANY NUMBER:”; N

CALL Check$ (X)

END

SUB Check$ (N)

Y=2

R= Y MOD N

IF R=0 THEN

C$= “EVEN”

ELSE

C$= “ODD”

END

C$=Check$

END FUNCTION

Debugged Program

 

REM To check the supplied no. is odd or even

DECLARE FUNCTION Check$ (X)

CLS

INPUT “ANY NUMBER:”; N

PRINT Check$ (N)

END

FUNCTION Check$ (N)

Y=2

R= N MOD Y

IF R=0 THEN

C$= “EVEN”

ELSE

C$= “ODD”

END IF

Check$ = C$

END FUNCTION

 

 

 

7. Study the following program and answer the given questions:                                   (2x1=2)

 

DECLARE SUB TEST (B$)

CLS

INPUT W$

CALL TEST (W$)

END

SUB TEST (B$)

FOR I =1 To LEN (B$)

PRINT RIGHT$(B$), i)

NEXT I

END SUB

 

Questions:

 

a) Write the name of two built in functions used in the above program.

Ans: The two built in functions used in the above program Re LEN ( ), RIGHT$( )

b) List the real parameters of the above program.

Ans: W$ is the real parameter used in the above program.

 

 

 

 

 

Group C (16 Marks)

 

8. Convert/Calculate as per the instruction: (1x44)

 

i) (231)10  =  (x)16

Divide by the base 16 to get the digits from the remainders:

Division
by 16

Quotient

Remainder

(Digit)

(231)/16

14

7

(14)/16

0

14

= (E7)16

 

(231)8  =  (153)10

 

ii) (10010001)2  = (?)10

   = 1x27+0x26+0x25+1x24+0x23+0x22+0x21+1x20

=1x128 +0x64 + 0x32 + 1x16+0x4+0x2+1x1

=128+0+0+16+0+0+1

=145

(10010001)2  = (145)10

 

 

 

ⅲ) (1101001-1111) + 111001

 

 

 

1

1

0

1

0

0

1

 

 

 

 

 

 

1

1

1

1

 

 

 

1

0

1

1

0

1

0

 

 

 

+

1

1

1

0

0

1

 

 

1

0

0

1

0

0

1

1

 

(1101001-1111) + 111001 = 10010011

 

iv) (1011001 ¸ 111)

111)

1

0

1

1

0

0

1

(1100

 

 

1

1

1

 

 

 

 

 

 

1

0

0

0

 

 

 

 

 

 

1

1

1

 

 

 

 

 

0

0

0

1

0

1

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

1

0

1

 

 

Q=1100

R=101

 

9. Answer the following                                                                                                        (4x2=8)

 

a) WAP to calculate area of rectangle using FUNCTION and area of circle using SUB.

 

DECLARE FUNCTION AREA (R)

DECLARE SUB CIR (R)

CLS

INPUT "ENTER RADIUS"; R

PRINT " AREA OF A CIRCLE="; AREA (R)

CALL CIR (R)

END

 

FUNCTION AREA (R)

AREA = 3.14 * R ^ 2

END FUNCTION

 

SUB CIR (R)

C = 2 * 3.14 * R

PRINT " CIRCUMFERENCE OF CIRCLE =" ; C

END SUB

 

 

b Write a program to reverse a number using SUB…END SUB.

 

DECLARE SUB REV (n)

CLS

INPUT "ENTER ANY NUMBER"; N

CALL REV(N)

END

 

SUB REV (N)

S=0

WHILE N < > 0

R = N MOD 10

S = S * 10 + R

N = N \ 10

WEND

PRINT “REVERSE NUMBER IS”; S

END SUB

 

 

10. Write a program to ask a number and check it is exactly divisible by 3 and 7 using FUNCTION……END FUNCTION.

DECLARE SUB CHECK (N)

CLS

INPUT “ENTER ANY NUMBER”; N

CALL CHECK (N)

END

 

SUB CHECK (N)

IF N MOD 3 = 0 AND N MOD 7 = 0 THEN

PRINT “THE GIVEN NUMBER IS COMPLETELY DIVISIBLE BY 3 AND 7”

ELSE

PRINT THE GIVEN NUMBER IS NOT COMPLETELY DIVISIBLE BY 3 AND 7”

END IF

END SUB

 

or

 

Write a program to accept age and citizen of a person to check whether he/she is eligible to cast vote or not using SUB…END SUB.

 

DECLARE SUB CHECK(A )

CLS
INPUT “Enter age”; A

CALL CHECK(A)

END

SUB CHECK(A)

IF A >=18 THEN

PRINT “You are eligible to vote”

ELSE
PRINT “You are not eligible to vote”

END IF

END SUB

No comments:

Post a Comment