Wednesday, September 28, 2022

MAAF MID TERM SEE COMPUTER SCIENCE SOLVED

 MUTUAL ACADEMIC ACITIVITIES FORUM (MAAF)

Kathmandu, Nepal

Mid Term Examination 2079

Class X

Time:-1:30 hrs

F.M:-50                                                                      P.M:- 20

Subject:-Computer Science

Candidates are required to give their answers according to the given instructions,

Group "A" [10 Marks]

 

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

 

a) What is network topology?

The arrangement or connection pattern of computers or nodes and other devices of the network is called network topology.

 

b) Why switch is also known as smart hub?

switch is also known as smart hub because switch looks at the destination address and sends the packet to that address on a separate wire so no collision. 

 

c) What is cybercrime?

Cyber crime is an illegal action involved in any computer, computer system or overall computer networks like internet.

 

d) What is database?

A database is an organized collection of related information that can be used for different purpose so that it can easily be accessed, managed, and updated.

 

e) What is record in database?

Record is a collection of multiple related fields in a row which gives complete information about a person or thing.

 

f) Write any two advantages of modular programming.

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

 

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

 

a)     An organization that provides internet facility to the users. ISP

b)     The artificial environment created by computer technology to entertain user. Virtual Reality

 

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

 

a)     BNC - British Naval Connector

b)     UPS - Uninterruptible Power Supply

 

Group "B" - [24 Marks]

 

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

 

a) What is transmission media? Write 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)

 

b) Differentiate between client server and peer-to-peer network architecture.

 

client server network

peer-to-peer network

Client/ server network is a type of network architecture that consists of at least one server and one or more clients or workstations, where users do their work.

Peer-to-Peer network is a group of computers, which function both as servers and workstations to share data, information and other resources of the network.

It provides central security administration and the network administrator is responsible for data security and other resources management of the network.

It lacks centralized network administration, where the network administrator needs to manage security on each computer. It provides no reliable security and might put data in higher risks

 

c) Define e-commerce with its advantages.

Ecommerce, also known as electronic commerce or internet commerce, refers to the buying and selling of goods or services using the internet.

Advantages of E-commerce

a)     It makes buying/selling possible 24/7.

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

c)     You can set up an online business even by sitting at home if you have the required software, a device, and the internet.

d)     There are no geographical boundaries for e-business. Anyone can order anything from anywhere at any time.

 

d) Why is ethics important in information technology?

Ethics important in information technology because ethics make us become more discipline because we need to follow the rules and procedures of the organization.

 

e) What is software security? List out any two measures to protect computer hardware.

The security given to the software and data from being lost or damaged due to accidental or intentional harm is called software security.

any two measures to protect computer hardware

a)     Insurance Policy

b)     Regular maintenance of computer hardware 

 

f) What is loT? Write its some challenges.

A technology that connects all electronic devices together and prompts them to exchange information without any human intervention.

Some challenges of IoT are

·        The customers change their demands frequently so IoT has to fulfill them

The hackers have got access to the smart devices and are changing their instructions.

 

g) Define RDBMS with some examples.

RDBMS is a database management system that is based on the relation model in which data is stored in the form of tables and the relationship among the data is also stored in the form of tables.
E.g.: SQL, MS-Access, Oracle, etc.

 

h) Write any four advantages of computerized database.

a)     It controls data redundancy which means duplication of data.

b)     It allows sharing the existing data by different programs.

c)     Large volume of data can be stored and updated easily.

d)     It provides high security of data as well as maintains accurate database.

 

i) What is the primary key? Why is it important to specify?

A key that uniquely identifies each record in a database is primary key. It is important because it neither accepts duplicate values nor null values.

 

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

 

DECLARE SUB Num ( )

CLS

CALL Num

END

 

SUB Num

N=2

A=5

C=1

WHILE C <= 9

PRINT N

N=N*3+A

A=A-1

C=C+2

WEND

END SUB

 

Dry Run

Variable

Variable

Variable

Condition

Output

N

A

C

C < = 9

2

11

37

114

343

2

5

1

1 < = 9 Yes

11

4

3

3 < = 9 Yes

37

3

5

5 < = 9Yes

114

1

7

7 < = 9 Yes

343

0

9

9 < = 9 Yes

1029

-1

11

11 < = 9 No

Loop Exits

 

 

Output

2

11

37

114

343

 

 

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

 

REM to display the reverse of the supplied string

DECLARE SUB rev (s$)

CLS

INPUT n$

CALL rev$(n$)

END

 

SUB rev (n$)

FOR k=1 TO LEN(n$).

a$ = MID$(n$, 1, k)

p$ = p$ + n$

NEXT k

PRINT p$

END SUB

 

Debugged Program

DECLARE SUB rev (s$)

CLS

INPUT n$

CALL rev (n$)

END

 

SUB rev (n$)

FOR k= LEN(n$) TO 1 STEP-1

a$ = MID$(n$, k, 1)

p$ = p$ + a$

NEXT k

PRINT p$

END SUB

 

 

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

 

DECLARE FUNCTION count(bs)

INPUT a$

num=count (a$)

PRINT num

END

 

FUNCTION count (b$)

FOR K=1 to LEN (bs)

aS=MIDS(b$, K, 1)

IF UCASES(a$)="D" THEN

c=c+1

END IF

NEXT K

count = c

 

END FUNCTION

 

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

The name of FUNCTION procedure used in above program is count( ).

 

b) List out the formal and actual arguments from the

Formal parameter – b$, Actual parameter – a$

 

 

Group "C"-[16 Marks]

 

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

 

a) (7CF)16= (?)2

b) (1101101)2= (?)8  

c) (1010) x (1110)-(1101)

d) (1010111)2 ÷ (110)

9. a) Write a program to check whether input number is negative, positive or zero using FUNCTION procedure. [4]

DECLARE FUNCTION CHECK$ (N)

CLS

INPUT “ENTER ANY NUMBER”; N

PRINT “The given number is “; CHECK$(N)

END

FUNCTION CHECK$ (N)

IF N > 0 THEN

CHECK$ = “POSITIVE NUMBER”

ELSEIF N < 0 THEN

CHECK$ = “NEGATIVE NUMBER”

ELSE

CHECK$ = “ZERO”

END IF

END FUNCTION

 

b) Write a SUB program to print series: 1,1, 2, 3, 5, 8, ........... up to 10th terms.             [4]

DECLARE SUB SERIES ()

CLS

CALL SERIES

END

 

SUB SERIES

A = 1

B = 1

FOR I = 1 TO 10

PRINT A;

C = A + B

A = B

B = C

NEXT I

END SUB

 

c) Write a program in QBASIC that asks radius of a circle and calculates its area and circumference. Create a user-defined function to calculate area and sub program to calculate circumference.       [4]

Hint: [A = Ï€R2]                     [Cir = 2Ï€R]

 

DECLARE FUNCTION FIRST (R)

DECLARE SUB SECOND (R)

CLS

INPUT "ENTER RADIUS"; R

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

CALL SECOND (R)

END

 

FUNCTION FIRST (R)

FIRST = 3.14 * R ^ 2

END FUNCTION

 

SUB SECOND (R)

C = 2 * 3.14 * R

PRINT " CIRCUMFERENCE OF CIRCLE =" ; C

END SUB

 

 

 

No comments:

Post a Comment