Showing posts with label KARUDHARA. Show all posts
Showing posts with label KARUDHARA. Show all posts

Saturday, 14 December 2024

COMPUTER SET SOLVED -3

   Shree Ratan Pandey Secondary School               

     Pokhara -13 Arva Kaski    

    Second Terminal Examination         

  Grade: 10                                                    Subject:   Computer Science 

                                                                                   F.M: 50 

                                                                                Time: 2 hours             

           Group A 

 VERY SHORT QUESTIONS                                            1X10=10

1. Define Bandwidth.

 Answer: Bandwidth is the maximum rate of data transfer that can be achieved over a given communication channel.

2. What is Mobile Computing?

 Answer: Mobile computing refers to the ability to access and process information and applications wirelessly while on the move using portable devices like laptops, smartphones, and tablets. 

3. List any two examples of DBMS.

 Answer:   MySQL, Oracle Database

4. Which view in MS Access helps us to modify table?

 Answer: Design View

 5. List out any two types of Modular programming 

 Answer:  Sub programs and Functions 

6. Define format specifiers in C language.

Answer: Format specifiers are special characters used in C programming to control the output format of data when using functions like printf and scanf. Examples include %d for integers, %f for floating-point numbers, %c for characters, and %s for strings.

2.  Write the appropriate technical term of the followings              2X1=2

a. A device that connects two dissimilar networks: Gateway

b. The technology to encode file or message: Encryption

2. Write the full form of the following terms

a. ISDN: Integrated Services Digital Network

b. SMTP: Simple Mail Transfer Protocol

Group B (2 marks each)

 4. A. Draw a figure of star topology and write its 2 advantages.

 Answer:

     Advantages:

         Centralized control: Easy to manage and troubleshoot as all traffic passes through the central hub.

         Fault isolation: If one device fails, it doesn't affect the rest of the network.

B. Define digital footprint. How can you manage your digital footprint?

    Answer: Digital footprint is the trail of data you create while using digital devices and online services.  It includes your online activity, social media posts, search history, and more.

       Managing your digital footprint involves:

  1.  Adjusting privacy settings on social media and other online platforms.
  2. Regularly reviewing and deleting old posts, accounts, and data you no longer want              associated with you.

C. What is software security? Write any two principles of information security.

 Answer: Software security refers to the measures taken to protect software from vulnerabilities and attacks that could compromise its integrity, confidentiality, and availability.

       Principles of information security:

  1.  Confidentiality: Ensuring that only authorized individuals can access and use sensitive       information. Integrity: Maintaining the accuracy and completeness of information.

   D. What is Ecommerce? Write any two advantages of Ecommerce

 Answer: Ecommerce is the buying and selling of goods and services electronically, typically over the internet.

        Advantages:

         Increased reach: Businesses can reach a global audience beyond geographical limitations.

         Reduced costs: Lower overhead costs compared to traditional brick and mortar stores.

E. What is contemporary technology? Write any two advantages of cloud computing.

 Answer: Contemporary technology refers to the latest and most advanced technologies currently in use.

     Advantages of cloud computing:

         Scalability: Resources can be easily scaled up or down based on demand.

         Cost effectiveness: Pay as you go pricing models can reduce IT infrastructure costs.

F. Differentiate between field and records in DBMS with an example.

 Answer:  Field: A single unit of data within a record. Example: In a student database, "Name," "Roll No," and "Age" would be individual fields.

     Record: A collection of related fields that represent a single entity. Example: A student's complete information (Name, Roll No, Age, etc.) would constitute a single record.

10. What is RDBMS? Write any two examples of it.

 Answer:  RDBMS (Relational Database Management System) is a type of database system that organizes data into tables with rows and columns, establishing relationships between them.

     Examples:   MySQL    Oracle Database 

G. What is DBMS? Write any two names of keys available in DBMS.DBMS: A Database Management System (DBMS) is software that enables the creation, management, and operation of databases. It allows users to store, retrieve, and manipulate data efficiently 

Two keys in DBM

A. Primary Key        B. Foreign Key

H. What is a query? Write any two ways of creating a query A query is a request to retrieve or manipulate data from a database. Queries are written in a structured query language like SQL to perform operations such as selection, insertion, deletion, and updating. 

Two ways of creating a query

 Using SQL statements like SELECT, INSERT, etc. 

Using query-building tools provided in DBMS software (e.g., Query Designer in MS Access).

3. Write down the output of the given program and show it with a dry run table.

Program:

DECLARE SUB show ()
CLS
CALL show
END
SUB show
FOR I = 1 TO 7 STEP 3
S = S + I ^ 3
NEXT I
PRINT S
END SUB

Dry Run Table:

Iteration (I) S (Cumulative Sum)
1 1 1
4 64 65
7 343 408

Output:
408


4. Rewrite the given program after correcting the bugs.

REM to add more data in a sequential file
OPEN "EMP.DAT" FOR INPUT AS #2
DO
INPUT "ENTER NAME"; N$
INPUT "ENTER ADDRESS"; A$
INPUT "ENTER SALARY"; S
WRITE #1, N$, A$, S
INPUT "DO YOU WANT ADD MORE RECORDS"; M$
LOOP WHILE UCASE(M$) = "Y"
END

Corrected Code:

REM to add more data in a sequential file
OPEN "EMP.DAT" FOR APPEND AS #1
DO
INPUT "ENTER NAME: ", N$
INPUT "ENTER ADDRESS: ", A$
INPUT "ENTER SALARY: ", S
WRITE #1, N$, A$, S
INPUT "DO YOU WANT TO ADD MORE RECORDS (Y/N)? ", M$
LOOP WHILE UCASE$(M$) = "Y"
CLOSE #1
END

5. Study the following program and answer the given questions.

DECLARE FUNCTION num (N)
FOR I = 1 TO 5
READ N
Z = num(N)
S = S + Z
NEXT I
PRINT S
DATA 11,14,16,5,7
END

function num(N)
  IF N MOD 2 = 0 THEN num = N
END FUNCTION

Questions.

a. List the library functions used in the above program

No library functions are used in the above program.

b. Write the name of the function used in the above program.

The function used in the above program is num ()

Group 'C'

8. Convert/Calculate as per the instruction:

a. (A4D)16=(?)10

A * 16^2 + 4 * 16^1 + D * 16^0

= 10 * 256 + 4 * 16 + 13 * 1
= 2560 + 64 + 13
= 2637

Therefore, (A4D)₁₆ = 2637₁₀

b. (37)10 =()8
    37 ÷ 8 = 4 R 5
     4 ÷ 8 = 0 R 4

Reading the remainders from the bottom up:
45


c (10101)X(101)+(1010)2

9. Write a program in QBASIC to print the circumference of a circle using SUB and the volume of a cylinder using FUNCTION.

DECLARE SUB Circumference(R)
DECLARE FUNCTION Volume(R, H)
CLS

INPUT "Enter radius of the circle: ", R
CALL Circumference(R)

INPUT "Enter height of the cylinder: ", H
PRINT "Volume of cylinder: "; Volume(R, H)

END

SUB Circumference(R)
  C = 2 * 22 / 7 * R
  PRINT "Circumference of circle: "; C
END SUB
FUNCTION Volume(R, H)
  Volume = 22 / 7 * R ^ 2 * H
END FUNCTION

11. Write a program to display all the records of employees whose salary is more than Rs. 50,000.

OPEN "EMPLOYEE.DAT" FOR INPUT AS #1
DO WHILE NOT EOF(1)
  INPUT #1, SN, Name$, Address$, Post$, Salary
  IF Salary > 50000 THEN
    PRINT "Serial No: "; SN
    PRINT "Name: "; Name$
    PRINT "Address: "; Address$
    PRINT "Post: "; Post$
    PRINT "Salary: "; Salary
  END IF
LOOP
CLOSE #1


10. Write a program to find simple interest using C language.

#include <stdio.h>

int main() {
    float P, T, R, SI; 
    printf("Enter Principal amount: ");
    scanf("%f", &P);

    printf("Enter Time (in years): ");
    scanf("%f", &T);

    printf("Enter Rate of Interest: ");
    scanf("%f", &R);

    // Calculate Simple Interest
    SI = (P * T * R) / 100;

    
    printf("Simple Interest = %.2f\n", SI);

    return 0;
}
or Wap in C to check the students whether they are pass or fail when the pass marks is 35
#include <stdio.h> int main() { int marks; printf("Enter the marks obtained by the student: "); scanf("%d", &marks); if (marks >= 35) { printf("The student has passed.\n"); } else { printf("The student has failed.\n"); } return 0;
}


Thank you !


Saturday, 7 September 2024

COMPUTER SCIENCE SOLVED-2 FOR SEE


 

      KARUDHARA QUESTION SET COLLECTION SET NO 2

             Group A                               [6*1=6]

1.     What is unguided media?

Unguided media refers to communication channels that transmit data without requiring a physical conductor.

2.     What is the business done through the internet?

The business done through the internet is called E-commerce.

3.     Which data type is used to store date of birth in MS-ACCESS?

Date time data type is used to store date of birth in MS-ACCESS.

4.     Write any two elements of the database.

Tables and Queries are two elements of the database.

5.     What is modular programing?

Modular programming is a design method that divides a program into separate, self-contained modules, enhancing readability, reusability, and maintainability.

6.     Write any two features of C-language.

Two advanced features of the C-language are:

·       Pointer arithmetic

·       Dynamic memory allocation

   2. Write appropriate technical terms for the following. [2]

        a. A secret group of characters, used to protect the computer system from unauthorized users.


          Password.

        b. An artificial intelligence environment created by a computer system that appears real .

           Virtual reality.

3. Write the full form of the following. [2]

  a. URL: Universal resource Locator

  b. STP: Shielded twisted pair.

 

     Group B                                                                                                 [9X2=18]

  1. Define network topology draw a diagram of star topology.

Network topology refers to the arrangement and interconnection of various elements (nodes, links, etc.) in a computer network. It defines the physical or logical layout of a network and how different nodes (computers, devices) are connected and communicate with each other. 

 




Write any four commandments of computer ethics.

1.     We should not use a computer to harm other people.

2.     We should not interfere with other people's computer work.

3.     We should not snoop around in other people's computer files.

4.     We should not use a computer to steal.

3.     What are the Common Computer Security Threats. Mention any two measures to protect from security threats.

1.     Malware: Malicious software designed to damage, disrupt, or gain unauthorized access to computer systems.

2.     Phishing: Fraudulent attempts to obtain sensitive information by disguising itself as a trustworthy entity in electronic communications.

Measures to Protect Against Security Threats

1.     Use Antivirus Software: Install and regularly update antivirus software to detect and remove malware.

2.     Enable Multi-Factor Authentication (MFA): Add an extra layer of security by requiring multiple forms of verification before granting access to accounts or systems.

       4. What is Artificial Intelligence (AI)?

Artificial Intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think and learn like humans. AI systems can perform tasks such as problem-solving, decision-making, and language understanding. Examples of AI:

1.     Voice Assistants: Devices like Amazon Alexa and Google Assistant use AI to understand and respond to voice commands.

2.     Self-Driving Cars: Companies like Tesla use AI to enable cars to navigate and drive autonomously

 5. What is E-commerce?

E-commerce, or electronic commerce, refers to the buying and selling of goods and services over the internet. It includes various types of business transactions, such as retail sales, online auctions, and business-to-business (B2B) exchanges.

Two E-commerce Companies in Nepal:

1.     Daraz Nepal: One of the largest online marketplaces in Nepal, offering a wide range of products from electronics to fashion1.

2.     SastoDeal: A leading e-commerce platform in Nepal, known for its diverse product categories and competitive prices.

6.   List any four features of MS- ACCESS.

  Any four features of MS- ACCESS ARE

1.     Importing data from Excel or other databases.

2.     Creating forms for data entry or viewing.

3.     Designing and running data retrieval queries.

4.     Designing reports to be either printed or turned into a PDF.

 

7. What is primary key? Give any two benefits of it.

Primary Key is a unique identifier for each row in a database table. It ensures that every record has a distinct value, preventing duplicate entries.

Two key features of a primary key:

1.     Uniqueness: Each row must have a unique primary key value. This prevents data redundancy and inconsistencies.

2.     Non-Null: A primary key cannot contain null values. This ensures that every record can be uniquely identified.

8. Write the difference between SELECT QUERY and ACTION QUERY.

Aspect

SELECT Query

APPEND Query

Purpose

Retrieves data from one or more tables.

Adds data from one table to another existing table.

Operation

Reads data without modifying the source tables.

Inserts data into a target table, modifying its contents.

Result

Returns a result set (rows) based on the specified criteria.

Adds rows to the target table based on the specified criteria.

Syntax

SELECT column1, column2 FROM table WHERE condition;

INSERT INTO target_table (column1, column2) SELECT column1, column2 FROM source_table WHERE condition;

Use Case

Used for data retrieval and analysis.

Used for data migration or combining data from multiple sources.

Impact

No changes to the database.

Changes the database by adding new rows to the target table.

9. Identify a record table and field from the following table. [2]

Symbol no

Name

Marks

00100202S

Aarambha Shrestha

91

00100230T

Suhisha raymajhi

99

 

 

 

Fields:

1.     Symbol no

2.     Name

3.     Marks

Records:

1.     Record 1:

o   Symbol no: 00100202S

o   Name: Aarambha Shrestha

o   Marks: 91

2.     Record 2:

o   Symbol no: 00100230T

o   Name: Suhisha Raymajhi

o   Marks: 99

 

5. Write down the output of the given program and show them in a dry run table. [10 ]

DECLARE FUNCTION SQN (N)

CLS

S=0

FOR L=1 TO 3

READ NUM

S=S+SQN (NUM)

NEXT L

PRINT "Sum of square"; S

DATA 1, 4, 5

END

FUNCTION SQN (N)

SQN = N^2

END FUNCTION

 

 

 

 

S=0

FOR I = 1 TO 3

READ 1,4,5

S=S+SQN

SQN=N^2

 

1 TO 3 YES

1

1

1^1=1

 

2 TO 3 YES

4

1+16=17

4^4=16

 

3 TO 3 YES

5

17+25=42

5^5=25

 

4 TO 3 NO

 

 

 

 

 

LOOP EXISTS

 

 

 

The output of the program is: 42

6.  Rewrite given program after correcting the bugs:

DECLARE SUB Square (A)

REM to print square of a input number

CLS

GET "Enter a number"; N

Square (N)

END

SUB Square (A)

Sq = A^ 4

Display "Square of a number is "; Sq

End Sub

AFTER DEBUGGING

DECLARE SUB Square (A)

REM to print square of a input number

CLS

INPUT "Enter a number"; N

CALL Square (N)

END

SUB Square (A)

Sq = A^ 2

PRINT "Square of a number is "; Sq

End Sub

 

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

DECLARE FUNCTION Count (W$)

INPUT "Enter a word"; R$

C = Count (R$)

PRINT C

END

FUNCTION Count (W$)

FOR L = 1 TO LEN (W$)

Ch$MID$ (W$, L, 1)

IF UCASES (Ch$) = "K" THEN

N=N+1

END IF

NEXT L

Count = N

END FUNCTION

1. List any two library functions used in the above program.

LEN () and UCASE() are the two library functions used in the above program

2.Write the use of variable 'C' in line 3 [i.e. C = Count (R$)] given in the above program.

            The use of variable ‘C’ in line 3 [i.e. C = Count (R$)] given in the above program is to store the value

           returned by the function count ()

    GROUP C                            4*4=12

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 the Volume.

[Hint: Area LxB and Volume = LxBxH]

DECLARE FUNCTION AREA(L,B)

DECLARE SUB VOLUME (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 VOLUME(L,B,H)

V=L*B*H

PRINT “Volume of Room=”; V

END SUB

 

B. Employee's name, address, gender and salary are stored in the "EMP.DAT" sequential data file.

Write a QBASIC program that displays all information about personnel whose salaries exceed 60000.

OPEN "EMP.DAT" FOR INPUT AS #1

CLS

WHILE NOT EOF (1)

INPUT #1, N$, A$, G$, SALARY

IF SALARY > 60000 THEN

PRINT N$, A$, G$, SALARY

WEND

CLOSE #1

END

10. Write a program in 'C' language to find simple interest where user need to input Principle, Rate and

Time.

#include <stdio.h>

int main() {

    float p, t, r, si;

    printf("Enter principal, time, and rate: ");

    scanf("%f %f %f", &p, &t, &r);

    si = (p * t * r) / 100;

    printf("The simple interest is %f\n", si);

    return 0;

}

Or

Write a program in 'C' language to display the series with their sum. 1,2,3,4, up to 10th term.

#include <stdio.h>

 

int main() {

    int sum = 0;

    for(int i = 1; i <= 10; i++) {

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

        sum += i;

    }

    printf("Total Sum = %d\n", sum);

    return 0;

}

Note: Number system have not been included in this webpage.

 

http://www.milanbaral123.blogspot.com

SEE IMP QUESTIONS C LANGUAGE

  Write a C program to calculate simple interest . The program should accept the principal amount , rate of interest , and time period as ...