Saturday, April 11, 2020

SEE New Model Computer Science Questions 2077

Computer Science

SEE  Model Question

Time: 1 hr 30 min

F.M. : 50

Group ‘A’ (10 Marks)

 

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

 

a.     What is search engine?

A search engine is a software program or script available through the Internet that searches documents and files for keywords and returns the results of any files containing those keywords.

 

b.     What is the business done through internet?

The business done through internet is e-commerce.

 

c.      Which data type is used to store alpha numeric characters or special symbols in MS-Access?

Text data type is used to store alpha numeric characters or special symbols in MS-Access.

 

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

Design view is used to modify a table in MS-Access

 

e.     What is modular programming?

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

 

f.      Write any two features of C language.

Any two features of C language are:

v It is easy to learn and implemented C language

v Occupies less memory

 

 

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

a.      Law that governs the legal issues of cyberspace.

Cyber Law

b.     The smallest unit to represent information on a quantum computer.

Qubit (Quantum bit)

 

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

a.      STP: Shielded Twisted Pair

b.     WAP: Wireless Application Protocol

 

Group ‘B’ [24 Marks]

 

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

 

a.     What is computer network? Enlist any two advantages of it.

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

Any two advantages of computer network are:

a)     Computer in a network can access the network-connected hardware devices like printers, disk drives, etc.

b)     Data in a network environment can be updated from any computer. Updated data can be accessed by all computers on the network.

 

 

 

b.     What is computer ethics? Write any two of them.

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

Any two cyber ethics are:

                           i.          You should not spread false and illegal information.

                         ii.          You should not destroy, erase or edit personal or group records.

 

c.      What is software security? Write any two measures of hardware security.

The security given to the machine and peripheral hardware from theft and from electronic intrusion (interruption) and damage is called software security.

Any two measures of hardware security are:

v Insurance

v Power Protection Device

 

d.     What is m-commerce? Write any two important services.

The online transactions through the wireless handheld devices such as mobile phone, laptop, palmtop, tablet, or any other personal digital assistant are called m-commerce.

Any two important services are:

v Buy and sell goods and services

v Access emails

 

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

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

Any two important of IoT are:

a)     Communication between the connected devices becomes more transparent and easier.

b)     Transferring data packets over a network reduces both time and money.

 

f.      What is database? Give any two examples.

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.g. Dictionary and Telephone Directory.

 

g.     What is primary key? List any two advantages of it.

A key that uniquely identifies each record in a database is primary key.

Any two advantages of primary key are:

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

 

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

Sorting is the process of arranging the record in ascending or descending order according to a given field or fields.

Any two advantages of sorting are:

i) It helps to find specific information quickly.
ii) It helps to arrange data in alphabetical order.

 

i.       What type of work is done in MS-Access using form and query object.

Form is an object of Ms-Access which provides graphical interface to enter data into the tables or multiple linked tables.

Query is an object of Ms-Access which extracts and arranges information from a table in a manner that is specified.

 

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

DECLARE SUB SHOW(A)

CLS

N=87

CALL SHOW(N)

END

 

SUB SHOW(A)

DO

B=A MOD 6+3

IF B MOD 4=0 THEN GOTO AA

PRINT B;

AA:

A=A-10

LOOP WHILE A>=50

END SUB

 

Dry run table

N

A

B=A MOD 6 + 3

IS B MOD 4=0 ?

PRINT B

A=A-10

WHILE A>=50

87

87

87 MOD 6 + 3

=3 + 3 = 6

 6 MOD 4=0 ?

2 = 0 No

6

87-10=77

77>=50 YES

 

77

77 MOD 6 + 3

5+3=8

8 MOD 4=0?

0=0 YES

 

77-10=67

67>=50 YES

 

67

67 MOD 6+3

1+3=4

4 MOD 4=0?

0=0 YES

 

67-10=57

57>=50 YES

 

57

57 MOD 6+3

3+3=6

6 MOD 4=0?

2=0 NO

 6

57-10=47

47>=50

NO Loop Exits

 

47

 

 

 

 

 

 

The output of the program is:

6   6

 

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

REM to add record in an existing file

CLS

OPEN “Record.Dat” FOR OUTPUT AS #1

AA:

INPUT “Enter Name, Class and Roll No.”; Nm$, Cl, Rn

INPUT #2, Nm$, Cl, Rn

INPUT “More records”; Y$

IF UCASE$(Y$)=”Y” THEN GOTO aa

CLOSE “Record.dat”

END

 

Debugged program:

REM to add record in an existing file

CLS

OPEN “Record.Dat” FOR APPEND AS #1

AA:

INPUT “Enter Name, Class and Roll No.”; Nm$, Cl, Rn

WRITE #1, Nm$, Cl, Rn

INPUT “More records”; Y$

IF UCASE$(Y$)=”Y” THEN GOTO AA

CLOSE #1

END

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

OPEN “Detail.dat” FOR INPUT AS #1

OPEN “Temp.dat” FOR OUTPUT AS #2

INPUT “Enter name of the students”; S$

FOR I=1 TO 10

INPUT #1, Nm$, Cl, A

IF S$< >Nm$ THEN

WRITE #2, Nm$, Cl, A

END IF

NEXT I

CLOSE #1, #2

KILL “Detail.dat”

NAME “Temp.dat” AS “Detail.dat”

END

a.     What is the main objective of the program given above?

The main objective of the program given above is to delete the record according to the entered name.

b.     Do you get any problem in the above program if “Kill” statement is removed? Give reason.

Yes, the program will display the error message and it won’t delete the record.

8.     Convert / Calculate as per the instruction.                                                  [4×1=4]

a.      (11001101)2 = (?)16

Soln:

Converting Binary to octal

Binary value in four bits

1100

1101

Octal number

C

D

 

(11001101)2 = (CD)16

 

b.     (524)10 = (?)2

Soln:

 

 

Remainder

2

524

 

2

262

0

2

131

0

2

65

1

2

32

1

2

16

0

2

8

0

2

4

0

2

2

0

2

1

0

2

0

1

 

(524)10 = (1000001100)2

 

a.      (1010)2 × (110)2 – (1011)2 = (?)2

 

 

 

1

0

1

0

 

 

×

1

1

0

 

 

0

0

0

0

 

1

0

1

0

×

+ 1

0

1

0

×

×

   1

1

1

1

0

0

 

-

1

0

1

1

1

1

0

0

0

1

 

(1010)2 × (110)2 – (1011)2 = (110001)2

 

 

 

a.      (10110)2 ¸ (101)2

101)

1

0

1

1

0(

100

 

-1

0

1

 

 

 

 

0

0

0

1

0

 

 

 

 

 

 

-0

 

 

 

 

 

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Quotient=100

Remainder=10

 

 

9.     a. Write a program in QBASIC that asks length, breadth and height of room and calculate its area and volume. Create a user defined function to calculate area and sub-program to calculate volume. Hint: [A=L×B], [V=L×B×H]

 

DECLARE FUNCTION AREA(L,B)

DECLARE SUB VOL(L,B,H)

CLS
INPUT “Enter Length”; L

INPUT “Enter Breadth”; B

INPUT “Enter Height”; H

PRINT “Area of room=”; AREA(L,B)

CALL VOL(L,B,H)

END

 

FUNCTION AREA(L,B)

AREA = L * B

END FUNCTION

 

SUB VOL(L,B,H)

V=L*B*H

PRINT “Volume of Room=”; V

END SUB

 

b. A sequential data file called “Record.txt” has stored data under the field heading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose gender is “F” and obtained marks in computer is more than 90.

 

OPEN “Record.txt” FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

INPUT #1, R, N$, G$, E, N, M, C

IF UCASE$(G$)=”F” AND C>=90 THEN

PRINT R; N$; G$; E; N; M; C

END IF

WEND

CLOSE #1

END

 

10.  Write a program in C language that asks a number and check whether it is odd or even.

 

#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 display the series with their sum.1, 2, 3, 4 upto 10th terms.

#include<stdio.h>

#include<conio.h>

int main()

{

int i, s=0;

i=1;

while(i<=5)

{

    printf("%d \n", i);

    s = s + i;

    i++;

}

print("%d \n Sum=", s);

return 0;

}

 

 

***


Monday, March 2, 2020

SEE COMPUTER SCIENCE PRACTICE 2076

SEE COMPUTER SCIENCE PRACTICE 2076





SET 1 - Telecommunication and Computer Network

SET 2 - Internet and Its Services

SET 3 - Computer Security

SET 4 - Computer Virus

SET 5 - Multimedia

SET 6 - Cyber Law and Computer Ethics

SET 7 - Database Management System (MS-Access)

SET 8 - Match the Following

SET 9 - Full Forms

SET 10 - Modular Programming

SET 11 - File Handling

SET 12 - C Programming

SET 13 - Number System

SET 14 - Find Output

SET 15 - Debugging

SET 16 - Analytical Program

SET 17 - Qbasic Programming Sequential Structure

SET 18 - Qbasic Programming Selection and Looping Structure

SET 19 - Qbasic Programming File Handling

SET 19 - Qbasic Program ----SEE Computer Science 2076 --- Practice Day 19 --- 20 Questions

SET 19 - Qbasic  Program ----SEE Computer Science 2076 --- Practice Day 19 --- 20 Questions


Group E
1.      Create a sequential data file “std.dat” to store name and marks obtained in English, Math and Science subjects for a few students. [SEE MODEL 2065]
2.      Write a program to store records regarding the information of Book Number, Book’s name and Writer’s name in a sequential data file called “Library.dat”. [SLC 2065 R]
3.      A sequential data file called “MARKS.DAT” contains roll no., name, English, nepali and maths fields. Write a program to display all the contents of data file. [SLC 2065 S], [SLC 2067 S]
4.      Write a program to create a sequential  data file “Employee.dat” to store employees’ name, address, age and gender. [SLC 2066 R]
5.      A data file “LIB.TXT” consists of Book’s name, Author’s name and price of books. Write a program to count and display the total number of records present in the file. [SLC 2066 S]
6.      A sequential data file “EMP.DAT” contains name, post and salary fields of information about employees. Write a program to display all information of employees along with tax amount also.(Tax is 15% of salary) [SLC 2067 R]
7.      A sequential data file called “student.dat” contains some records under the fields Name, English, Nepali and computer. Write a program to add some more records in the same sequential data file. [SLC 2068 R]
8.      Write a program to view those records from “Employee.dat” sequential data file having employee’s name, department, appointment data and salary whose salary is more than Rs 5000. [SLC 2068 S]
9.      Write a program to create a data file “teldir.dat” to store name, address and telephone number of employees according to the need of the user. [SLC 2069 R]
10.   A sequential data file “Staff.dat” contains the name, address, post and salary of the employees. Write a program to read and display all the records stored in the above file. [SLC 2069 S]
11.   A sequential data file called “Marks.dat” contains name, english, nepali, maths and science fields. Write a program to display all the contents of that data file. [SLC 2070 R]
12.   A sequential data file “Record.dat” has records with field name, addres, age and salary. Write a program to display only those records whose age is greater than 26. [SLC 2070 S]
13.   A data file “Salary.dat” contains the information of employee regarding their name, post and salary/ Write a program to display all the information of employee whose salary is greater than 15000 and less than 40000. [SLC 2071 R]
14.   A sequential data file called “Marks.dat” has stored data under the field heading Roll No, Name, English, Nepali and maths. Write a program to display all the information of those students whose marks in Nepali is more than 50. [SLC 2071 S]
15.   A sequential data file called “Marks.dat” contains NAME, AGE, CITY AND TELEPHONE fields. Write a program to display all the contents of the data file. [SEE 2072]
16.   Create a data file to store the records of few employees having Name, Address, Post, Gender and Salary fields. [SEE 2073]
17.   Write a program to store Roll no., Name, Class and Address of any five students. [SEE 2074]
18.   A data file "STAFF. dat" has stored records of few employees with EmPID, First name, Lastname, post and salary. Write a program to display all the records of the employees whose salary is more than  40,000. [SEE 2075]
19.   Write a program to create a sequential data file "salary.data" to store programmer's Name, salary and post according to the need of the user. [SEE 2075 S2]
20.   A Sequential data file called "SEE.DAT" has stored data under the field heading Symbol No., Name, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose marks in Computer is more than 80. [SEE 2074 S]

SET 18 - Qbasic Program ----SEE Computer Science 2076 --- Practice Day 18 --- 15 Questions




Group B
1.      Write a program using FUNCTION to get a word from the user and print the word in the reverse order.

 

DECLARE FUNCTION REV$ (S$)

CLS

INPUT "ENTER ANY STRING"; S$

PRINT "REVERSED STRING IS "; REV$(S$)

END

 

FUNCTION REV$ (S$)

FOR I = LEN(S$) TO 1 STEP -1

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

W$ = W$ + B$

NEXT I

REV$ = W$

END FUNCTION

 

Write a program using sub to get a word from the user and print the word in the reverse order.

 

DECLARE SUB REV (S$)

CLS

INPUT "ENTER ANY STRING"; S$

CALL REV(S$)

END

 

SUB REV$ (S$)

FOR I = LEN(S$) TO 1 STEP -1

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

W$ = W$ + B$

NEXT I

PRINT "REVERSED STRING IS "; W$

END FUNCTION

 

 

Write a program using FUNCTION….END FUNCTION to input a string and count the total number of consonants.

 

DECLARE FUNCTION COUNT (S$)

CLS

INPUT "ENTER ANY STRING"; S$

PRINT "TOTAL NO. OF CONSONANTS= "; COUNT(S$)

END

 

FUNCTION COUNT (S$)

CC = 0

FOR I = 1 TO LEN(S$)

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

C$ = UCASE$(B$)

IF C$ <> "A" AND C$ <> "E" AND C$ <> "I" AND C$ <> "O" AND C$ <> "U" THEN CC = CC + 1

NEXT I

COUNT = CC

END FUNCTION

 

Write a program to find the numbers of vowels in an input string using ‘SUB…..END SUB’. 

 

DECLARE SUB COUNT (S$)

CLS

INPUT "ENTER ANY STRING"; S$

CALL COUNT(S$)

END

 

SUB COUNT (S$)

VC = 0

FOR I = 1 TO LEN(S$)

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

C$ = UCASE$(B$)

IF C$ = "A" OR C$ = "E" OR C$ = "I" OR C$ = "O" OR C$ = "U" THEN VC = VC + 1

NEXT I

PRINT "TOTAL NO. OF VOWELS= "; VC

END SUB

 

Write a program using FUNCTION... END FUNCTION to count the number of words in a sentence.

 

DECLARE FUNCTION COUNT (S$)

CLS

INPUT "ENTER ANY STRING"; S$

PRINT "TOTAL NO. OF WORDS= "; COUNT(S$)

END

 

FUNCTION COUNT (S$)

WC = 1

FOR I = 1 TO LEN(S$)

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

IF B$ = " " THEN WC = WC + 1

NEXT I

COUNT = WC

END FUNCTION

 

Write a program to declare SUB procedure to print only the vowels from a given word.

 

DECLARE SUB DISPV (S$)

CLS

INPUT "ENTER ANY STRING"; S$

CALL DISPV(S$)

END

 

SUB DISPV(S$)

FOR I = 1 TO LEN(S$)

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

C$ = UCASE$(B$)

IF C$ = "A" OR C$ = "E" OR C$ = "I" OR C$ = "O" OR C$ = "U" THEN D$=D$+ B$

END IF

NEXT I

PRINT “VOWELS ONY ARE”; D$

END SUB

 

 


Group C
1.      Write a program to test whether the given number is positive or negative using SUB…..END SUB. [SEE MODEL 2065 ], [SLC 2066 S]
2.      Using SUB…END SUB Write a program to test whether the given number is completely divisible by 13 or not. [SLC 2067 R]
3.      Write a program to input three different numbers in the main module and then find the greatest number using SUB…END SUB. [SLC 2068 S]

Group D
1.      Using SUB…END SUB Write a program to print the following series 9,7,5,…1. [SLC 2065 R]
2.      Write a program using SUB…END SUB to print the series 1,1,2,3,5,8… upto ten terms. [SLC 2069 R]
3.      Write a program to print natural numbers from 1 to 5 using SUB…END SUB. [SLC 2069 S]
4.      Write a program using SUB…END SUB to print the first ten odd numbers. [SLC 2071 S]
5.      Write a program to print the sum of digits of a given number using SUB procedure. [SLC 2070 S]
6.      Write a program using a SUB procedure module to print the multiplication table of any input number up to tenth terms.[SEE 2075 S2]

SET 17 - Qbasic Program ----SEE Computer Science 2076 --- Practice Day 17 --- 12 Questions

SET 17 - Qbasic  Program ----SEE Computer Science 2076 --- Practice Day 17 --- 12 Questions


PROGRAMMING QUESTION
[9 Marks]

Group A
1.      Write a program to calculate the volume of a cylinder using FUNCTION….END FUNCTION.[SEE MODEL 2065], [SLC 2071 S]
2.      Using FUNCTION….END FUNCTION, Write a program to calculate distance travelled by a body. [SLC 2065R]
3.      Write a program using SUB…END SUB to get radius of circle and then print its area. [SLC 2065 S, SLC 2071 R, 2074, 2074 S]
4.      Write a program using FUNCTION module to calculate and print the volume of a box. [SLC 2066 R]
5.      Write a program using FUNCTION…END FUNCTION to find the average of any two numbers given by the user. [SLC 2066 S]
6.      Using FUNCTION…END FUNCTION Write a program to calculate the average of three numbers. [SLC 2067 R], [SLC 2070 S, SEE 2075]
7.      Write a program using SUB…END SUB to get radius of a circle and then print its circumference. [SLC 2067 S]
8.      Write a program to calculate the area of four walls using SUB…END SUB. [SLC 2068 R], [SEE 2073]
9.      Write a program in QBASIC to find the total surface area of a box using FUNCTION…END FUNCTION. [SLC 2068 S, 2075]
10.   Write a program to calculate and print the simple interest using FUNCTION…END FUNCTION. [SLC 2069 S]
11.   Write a program using FUNCTION…END FUNCTION to get temperature in celsius from the user and then print the temperature in fahrenheit. [SLC 2070 R]
12.   Write a program using FUNCTION…END FUNCTION, to find the area of triangle. [SEE 2072]