Friday, July 15, 2022

Solved Pabson Kathmandu Computer Science First Term Exam 2079

 Solved Pabson Kathmandu Computer Science First Term Exam 2079

Group A [10 Marks]

1. Answer the following questions in one sentence.

a) What is switch in network connecting device?

A switch is networking hardware that connects devices on a computer network by using packet switching to receive and forward data to the destination device.

b) What do you mean by digital citizenship?

Digital citizenship refers to the responsible use of technology by anyone who uses computers, the Internet, and digital devices to engage with society on any level.

c) What is web browser?

A web browser is an application software used to access and view websites.

d) What is cyber crime in this digital world?

Cybercrime refers to any illegal activity carried out using computers or the internet.

e) List the types of procedure used in Q-Basic Programming.

The types of procedure used in Q-Basic Programming are SUB Procedure and FUNCTION procedure

f) What is modular programming in Q-Basic?

Modular programming is a technique used to divide program into many small, manageable, logical and functional modules or blocks.

2. Write the technical term for the following statements.

a) The internet service that enables to connect a remote or host computer. Telnet

b) The amount of data that can be transmitted through communication channel in a fixed time period. Bandwidth

3. Write the full forms of the following:

a) ADSL - Asymmetric Digital Subscriber Line

b) HTTP - Hypertext Transfer Protocol

Group B [24 Marks]

What is computer network? Write any two advantages of computer network.

A computer network means two or more computers connected with each other to share data, hardware, software and other resources.

Any two advantages are:

a)     Data in a network environment can be updated from any computer.

b)     Information can be exchanged rapidly in computer network.

 

Explain transmission media with its types.

Transmission medium is a pathway that can transmit information from a sender to a receiver through wired or wireless medium on a network.

The types of communication medium are: 

 i) Guided Medium (Bounded or Wired)  

ii) Unguided Medium (Unbounded or Wireless)

What is search engine? List any two popular search engines.

A search engine is a software program that helps people find the information they are looking for online using keywords or phrases.

any two popular search engines are Google and Bing

Define e-mail with some advantages.

E-mail is a message sent from one computer to another over the Internet

Advantages of E-mail are:

Emails are delivered extremely fast when compared to traditional post

Emails can be sent and received from any computer, anywhere in the world, that has an Internet connection.

Define computer ethics. What are the issues relating to computer ethics?

Computer ethics can be defined as to follow the rules and regulation of computer technology and not to harm other computer users knowingly or unknowingly.

The issues relating to computer ethics are:

a)     You should not search the file or record of other people.

b)     You should not spread false and illegal information.

 

 

 

What is the importance of ICT in this digital society? Explain.

Information and communication technologies (ICT) play a significant role in all aspects of modern society. ICT have changed the way in which we communicate with each other, how we find needed information, work, conduct business, interact with government agencies, and how we manage our social lives. As ICT affect everyday lives, they also impact the macroeconomic growth, which in turn further affects society by enabling infrastructure and standard of living improvements.

What is star topology? Write its merits and demerits.

The network topology in which all computers or other devices are connected through a central device through a central device called hub or switch is called star topology.

Advantages of star topology

ii) Failure of single computer or cable doesn’t affect the entire network.
iv) It is easy to extend to network by attaching new devices to the central devices.

 

Disadvantages of star topology

i) It requires more cable in comparison of bus topology so it is more costly.
ii) Failure of central devices (hub or switch) break down the whole system.

 

 

Define main module and sub module in modular programming.

The top level controlling section or the entry point in modular programming is called main module. Sub module is a program which is written under the main module. It is a block of statement that solves a particular problem.

What are formal and actual parameters in programming?

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

Arguments are the values that are sent to the procedures (SUB program and FUNCTION). Actual or real parameters are called arguments.

 

 

5. Write the output of the given program showing the dry run table.

DECLARE SUB result ( )

CLS
CALL result

END

SUB result ( )

FOR I = 9 to 1 step -2

Sum = sum + i^2

NEXT i

PRINT sum

END SUB

Dry Run

Variable

Loop

Variable

Output

I

9 to 1 step -2

Sum

 

9

9 to 1 yes

81

165

7

7 to 1 yes

130

 

5

5 to 1 yes

155

 

3

3 to 1 yes

164

 

1

1 to 1 yes

165

 

-1

-1 to 1 no

Loop Exits

 

 

 

Output

165

 

6. Debug the following program:

DECLARE SUB SUM (P, Q, R)

CLS

INPUT “Enter the numbers”: P,Q,R

CALL SUM

END SUB

 

SUB Check(P,Q,R)

S = P + Q + R

PRINT “Sum of three numbers is”; SUM

END SUB

Debugged Program

DECLARE SUB SUM (P, Q, R)

CLS

INPUT “Enter the numbers”: P,Q,R

CALL SUM (P,Q,R)

END

 

SUB SUM(P,Q,R)

S = P + Q + R

PRINT “Sum of three numbers is”; S

END SUB

 

Read the following program and answer the given questions.

DECLARE FUNCTION FACT( N )

CLS
INPUT “Enter no”; N

PRINT “Factorial is”; FACT (N)

END
FUNCTION FACT (N)

F = 1

FOR X = 1 TO N

F = F * X

Next X

FACT = F

END FUNCTION

Questions:

a)     What is the name of function procedure used in the above program?

The name of function procedure used in the above program is FACT ( ).

b)    What is the main objective of the above program?

The main objective of the above program is to display the factorial of a given number.

Group C [16 Marks]

 




9 a) Write a program in Q-Basic to find the perimeter of rectangle using Sub…END SUB procedure.

DECLARE SUB PER (L, B)

CLS

INPUT “ENTER LENGTH”; L

INPUT “ENTER BREADTH”; B

CALL PER (L, B)

END

 

SUB PER (L, B)

P = 2 * (L + B)

PRINT “PERIMETER OF RECTANGLE”; P

END SUB

 

b) Write a program in Q-Basic to find the largest among three number using FUNCTION procedure.

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

 

10. Write a sub program to print sum of individual digit of input multi-digit numbers.

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

 

OR

Write a program to ask a number and display odd or even using FUNCTION procedure.

DECLARE FUNCTION CHECK$ (N)

CLS

INPUT “ENTER ANY NUMBER”; N

PRINT “THE GIVEN NUMBER IS “; CHECK$(N)

END

 

FUNCTION CHECK$ (N)

IF N MOD 2 = 0 THEN

CHECK$ = “EVEN NUMBER”

ELSE

CHECK$ = “ODD NUMBER”

END IF

END FUNCTION



No comments:

Post a Comment