Saturday, April 11, 2020

SEE New Model Computer Science Questions 2077 Issued by CDC




SEE  Model Question Issued by CDC

Opt. II Computer Science

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 an online tool that helps users find information on the internet using keywords or phrases and provide relevant results.

 

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?

The 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:

·       Portability: C code can be compiled and executed on different systems with minimal modifications.

·       C is a case-sensitive programming language. It understands the capital alphabets and small alphabets as different values 

 

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.

Computer network is a group of two or more computers and devices connected to each other through wired or wireless media to exchange data and information and share hardware, software and other resources.

Any two advantages of computer network are:

·       A network connected computers can share hardware devices such as scanner, printer, hard disk, etc.

·       It also provides the facility of data and software backup system.

 

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

Computer ethics is a set of moral principles or code of conducts that regulate the use of computers systematically without making harm to other users.

Any two cyber ethics are:

·       Do not use a computer to publish fake information.

·       Do not search the file or record of other people.

 

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

Software security means protecting software from being hacked or misused which ensures the software works properly and keeps data safe.

Any two measures of hardware security are: Insurance and Power Protection Device

 

d.     What is M-Commerce? Write any two important services.

M-commerce (Mobile Commerce) refers to buying, selling, and conducting business transactions through mobile devices like smartphones and tablets.

Any two important services are: mobile banking and mobile shopping.

 

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

IoT (Internet of Things) refers to a network of interconnected devices that communicate and share data over the internet.

Any two importance of IoT are:

·       Information is easily accessible from any place at any time on any device. 

·       Tasks can be performed automatically without human intervention.

 

f.      What is database? Give any two examples.

A collection of systematically organized inter-related data which store, organize and retrieve data is called a database. E.g. Dictionary and Telephone Directory.

 

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

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

Any two advantages of primary key are:

·       It sets the relationship between tables.

·       It reduces and controls duplication of record in a table

 

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

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 sorting 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.

 

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

·       Form provides graphical interface to view, modify and add data in a table or multiple linked tables.

·       Query is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

 

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

B MOD 4=0

PRINT B;

A=A-10

 

87

87

87 MOD 6 + 3=6

3+3=6

6 MOD 4=0

2=0 NO

6

87-10=77

77>=50 yes

 

77

77 MOD 6 + 3 =8

5+3=8

8 MOD 4=0

0=0YES

 

77-10=67

67>=50 yes

 

67

67 MOD 6 + 3=4

1+3=4

4 MOD 4=0

0=0 YES

 

67-10=57

57>=50 yes

 

57

57 MOD 6 + 3=6

3+3=6

6 MOD 4=0

2=0 NO

6

57-10=47

47>=50 no

 

47

 

 

 

 

 

The output of a 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 is to delete the record of a specific student, identified by their name from the data file Detail.dat.

 

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

Yes, there would be a problem if the KILL statement is removed. Because without the KILL statement, both Detail.dat and Temp.dat will exist, and the renaming (NAME "Temp.dat" AS "Detail.dat") will fail because a file cannot be renamed to an existing file's name, causing an error and preventing the update.

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

 

 

c.      (1010)2 × (110)2 – (1011)= (?)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)= (110001)2

 

d.      (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]