Sunday, January 26, 2025

SOLVED PABSON Kathmandu SEE COMPUTER SCIENCE 2081 FIRST TERMINAL EXAMINATION-2081 [A]

 


PABSON Kathmandu

FIRST TERMINAL EXAMINATION-2081

 

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'

 

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

 

a) What is downloading?

Download is the process of transferring files or data from a remote server or another device to user’s computer or device.

 

b) What is intranet?

An intranet is a private network for an organization's members to share information, resources, and communicate internally.

 

c) What is Wi-Fi?

Wi-Fi is a wireless technology that provides high-speed internet and network access using radio waves.

 

d) Write any two commandments of cyber ethics.

v Do not use a computer to publish fake information.

v Do not destroy or delete the records of other people.

 

e) What is an actual parameter?

Actual parameter is argument which is used to pass real value or data to the procedure.

 

f) What are the digits of hexadecimal number system?

The digits of the hexadecimal number system are:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.

Here, 0-9 represent values 0 to 9, and A-F represent values 10 to 15.

 

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

a)   Cabling structure of LAN.

      Topology

 

b)   Transferring illegal items through the internet that is banned in some locations.

      Cyber Laundering 

 

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

a) G2G      -          Government-to-Government

b) HTTP    -           Hypertext Transfer Protocol

 

Group ‘B'

 

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

a)   Write about bus topology with suitable diagram.

Bus topology is a network configuration where all devices are connected to a single central cable known as a "bus". If the main cable breaks, the whole network stops working. It is used in small networks where not many devices are connected.

 

 

 

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

      On the basis of geographical location, computer is classified into:

LAN (Local Area Network)

MAN (Metropolitan Area Network)

WAN (Wide Area Network)

A LAN (Local Area Network) is a network that connects computers and devices within a small area, like a home, office, or school.

A MAN (Metropolitan Area Network) is a network that covers a large area within a city allowing for data sharing and communication.

WAN (Wide Area Network) is a network that covers a large geographic area, such as different cities, countries, or even globally, connecting multiple LANs and MANs.

 

 

c)   Differentiate between bounded and unbounded media with examples.

Guided Media

Unguided Media

The media which uses cable or wire to transfer data and information among computers are called guided communication media.

Unguided communication is a communication channel in which data and information are transferred through the air.

Examples of guided media are Twisted Pair Cable, Co-Axial Cable and Fiber Optic Cable

Examples of unguided media are Radio Wave, Micro Wave and Satellite Communication

 

 

d) Write any four services of internet.

      Any four services of internet are:

v E-Mail

v Chat

v FTP

v E-Commerce

e)   Write any two opportunities and threats in social media.

Opportunities of Social Media

Connectivity: Enables people to connect and communicate globally.

Marketing and Branding: Provides a platform for businesses to promote products and reach a broader audience.

Threats of Social Media

Cyberbullying: Risk of harassment or bullying online.

Privacy Issues: Potential misuse of personal data and information.

 

f)   What do you mean by ICT?

ICT refers to the use of computers, the internet, and other digital tools to manage, communicate, and share information.

 

g)   What is the main aim of formulating cyber law of Nepal?

v To legalize the transaction through electronic media to control various types of electronic frauds

v To punish a person who does criminal activities through electronic means especially on computers.

 

h) What do you understand by modular programming? State any two advantages of it.

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

      Any two advantages are:

Coding the program and testing is very easy.

      Different programmers can write different modules separately.

 

i)    What is local and global variable in QBASIC?

A variable which is defined in a module and is not accessible to any other module is called local variable.

Variables which are declared outside the procedure and whose values can be accessed from any procedure or module are called global variables.

 

 

 

5. Write down the output of the given program.

       \Show with dry run in table.                                                     (2)

DECLARE SUB PATTERN(S$)

 CLS

B$=”PROGRAM”

CALL PATTERN(B$)

END

SUB PATTERN(S$)

 H=LEN(S$)

I=10

FOR J=1 TO H STEP 2

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

 H=H-2

I=I+1

NEXT J

END SUB

 

 Dry Run Table

B$ = S$

H=

LEN

(S$)

I

J=1 to 7 step 2

PRINT TAB(I);

MID$(S$,J,H)

H=H-2

I=I+1

 

PROGRAM

7

10

1 to 7 step 2 Yes

MID$(S$,1,7)

PROGRAM

7-2=5

10+1=11

 

5

11

3 to 7 step 2 Yes

MID$(S$,3,5)

OGRAM

5-2=3

11+1=12

 

3

12

5 to 7 step 2 Yes

MID$(S$,5,3)

RAM

3-2=1

12+1=13

 

1

13

7 to 7 step 2 Yes

MID$(S$,7,1)

M

1-(2)=-1

13+1=14

 

 

-1

14

9 to 7 step 2 No

[Loop Exits]

 

 

 

 The output of the program is:

            PROGRAM

               OGRAM

                  RAM

                     M

 

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

      CREATE FUNCTION CUBE(A)

      REM to print cube of a number

      CLS

      Get "Enter a number"; A

      Call CUBE(A)

      END

FUNCTION CUBE(A)

ANS=A^3

ANS=CUBE

END FUNCTION

 

Debugged Program

      DECLARE FUNCTION CUBE(A)

      REM to print cube of a number

      CLS

      INPUT "Enter a number"; A

      PRINT CUBE(A)

      END

 

FUNCTION CUBE(A)

ANS=A^3

CUBE=ANS

END FUNCTION

 

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

                                                                                                (2´1=2)

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.

The MOD operator is used to calculate the remainder.

 

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

      The loop executes 10 times in the above program.

 

Group ‘C'

 

Long question Answers:                                                       (4´4=16)

8.  Convert / calculate as per the instruction:

i) (111011 + 1101 ) - ( 11011 )    

 

1

1

1

0

1

1

 

 

+

1

1

0

1

1

0

0

1

0

0

0

 

-

1

1

0

1

1

 

1

0

1

1

0

1

 

(111011 + 1101 ) - ( 11011 ) = (101101)

 

ii) ( 11011 X 11 )  (110)

 

 

1

1

0

1

1

 

 

 

 

×

1

1

 

 

1

1

0

1

1

 

1

1

0

1

1

×

1

0

1

0

0

0

1

 

 

 

 

110)

1

0

1

0

0

0

1

(1101

 

 

1

1

0

 

 

 

 

 

 

1

0

0

0

 

 

 

 

 

 

1

1

0

 

 

 

 

 

 

 

1

0

0

1

 

 

 

 

 

 

1

1

0

 

 

 

 

 

 

0

1

1

 

 

Q=1101

R=011

 

iii) ( 235 )10  into octal     

 

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

Division
by 8

Quotient

Remainder

(Digit)

(235)/8

29

3

(29)/8

3

5

(3)/8

0

3

= (353)8

( 235 )10  = (353)8

 

 

iv) ( 9A5 )16 into binary

 

Convert each hex digit to 4 binary digits

9A5

9 = 1001

A = 1010

5  = 0101

= 1001 1010 0101

( 9A5 )16 = (1001 1010 0101)2

 

 

 

 

 

9.   a)   Write a program in QBASIC that asks two numbers to find remainder using SUB….END SUB program and product of two numbers using FUNCTION…END FUNCTION.

DECLARE SUB DIV(A,B)

DECLARE FUNCTION PRO(A,B)

CLS
INPUT “Enter First Number”; A

INPUT “Enter Second Number”; B

CALL DIV(A,B)

PRINT “The product of two numbers=”; PRO(A, B)

END

 

SUB DIV(A,B)

R = A MOD B

PRINT “Remainder of two numbers=”; R

END SUB

 

FUNCTION PRO(A,B)

PRO = A * B

END FUNCTION

 

b) WAP to find sum of digits of a number using SUB….END SUB. [Hint: 456: 4+5+6=15]

DECLARE SUB SUM (N)

CLS

INPUT "ENTER ANY NUMBER"; N

CALL SUM (N)

END

 

SUB SUM (N)

S = 0

WHILE N < > 0

R = N MOD 10

S = S + R

N = N \ 10

WEND

PRINT "SUM OF DIGITS="; S

END SUB

10. Write a program to find greatest number out of three numbers using FUNCTION…END FUNCTION.

DECLARE FUNCTION GREAT (A, B, C)

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

PRINT “THE GREATEST NUMBER IS”; GREAT (A, B, C)

END

 

FUNCTION GREAT (A, B, C)

IF A > B AND A > C THEN

G = A

ELSEIF B > A AND B > C THEN

G = B

ELSE

G = C

END IF

GREAT = G

END FUNCTION

 

or

Write a program to count the occurrence of letter 'e' in the supplied string using SUB…END SUB.

DECLARE SUB COUNT (S$)

CLS

INPUT "ENTER ANY STRING"; S$

CALL COUNT(S$)

END

 

SUB COUNT (S$)

EC = 0

FOR I = 1 TO LEN(S$)

B$ = MID$(S$, I, 1)

C$ = UCASE$(B$)

IF C$ = "E" THEN EC = EC + 1

NEXT I

PRINT "TOTAL NO. OF LETTER E = "; EC

END SUB

 

 

?ÿ@

No comments:

Post a Comment