Computer for SEE and NEB

It is a complete SEE and NEB solution for computer science. It includes Computer Fundamentals, Database (SQL), Programming in C QBASIC, CSS, JavaScript, and PHP for beginners.

Breaking

Post Top Ad

Your Ad Spot

Wednesday, April 5, 2023

NEB Question model of class 12 computer


NEB Question model of class 12 computer






Introduction:

The National Examination Board (NEB) is responsible for conducting the Class 12 board exams in Nepal. The board sets the question papers, which are designed to test the students' knowledge and understanding of various subjects. In this article, we will focus on the NEB Question Model of Class 12 Computer.

Structure of the NEB Question Model of Class 12 Computer:


The NEB Question Model of Class 12 Computer consists of three groups: All groups are compulsory. Group 'A' is very short questions, group "B" is short questions and group 'C' is Long questions.

Solved example of NEB Question model of class 12 computer

Following is the solved example of NEB question model of class 12 computer science.

Grade: 12                                                                 Sub:  Computer Science
Time: 2 hrs.                                                              Full Marks: 50


Candidates are requested to give their answers in their own words as far as practicable.
The figures in the margin indicate full marks.


Group ‘A’

Re-write the correct options of each question in your answer sheet. (9×1=9)

1. Which of the following is used to display the output in PHP?

a) echo      b) write      c) print      d) Both (a) and (c)

2. The primary key does not accept …….

a) Text      b) Number    c) Null value      d) None of the above

3. TCP is a commonly used protocol at

(a) Application layer (b) Transport layer

(c) Network layer (d) Data link layer

4. A table named product(pid, pname, price) contains records. To fetch all records in SQL we use 5

(a) SELECT * FROM product;

(b) DISPLAY all;

(c) PRINT all from product;

(d) PRINT * from product;


5. What will be the output of following JavaScript code? <script>

var string1="40";

var intvalue=50;

alert(string1+intvalue);

</script>

a) 40    b) 50     c) 4050     d) 40 50

6. The ____________ determines whether the project should go forward.

(a) Feasibility assessment
(b) opportunity identification
(c) system evaluation
(d) program specification

7. Which of the following is a technology that is commonly used in virtual reality (VR) systems?

(a) Artificial intelligence (AI)
(b) Mobile computing
(c) Augmented reality (AR)
(d) Natural language processing (NLP)

8. Which software prevents external access to a system?

(a) Firewall (b) Gateway   (c) Router (d) Antivirus Virus checker


9. Which of the following is the way in which an IoT device is associated with data?

(a) Internet (b) Cloud  (c)Automata  (d) Network


Group ‘B’

Give short answer of the following questions. (5×5=25)

10. Explain normalization with its advantages. Give an example of 1NF. (3+2)
Ans: Normalization is a process of organizing data in a database in a structured way to eliminate redundancy and ensure data consistency. It involves breaking down a database into smaller, more manageable tables and defining relationships between them to minimize data duplication. Normalization helps to reduce data anomalies, improve data quality, and make the database more scalable and flexible.

Advantages of Normalization:

i) Improved data quality

ii) Reduced data redundancy

iii) Better database design

iv) Reduced data anomalies


Example of 1NF:

First Normal Form (1NF) is a level of database normalization that requires all data in a table to be atomic. Atomicity means that each cell in a table should contain a single, indivisible value and not a list or a set of values. This ensures that each row in a table represents a single instance of an entity and that each column in a table represents a single attribute of that entity.

Let's consider an example to understand 1NF.

Suppose we have a table of employees as follows:

Consider a table named "Customers" with the following attributes:

CustomerID

Name

Phone Numbers

001

Ram

123456789, 987654321

002

Sita

555555555, 666666666, 777777777

 In this example, the "Phone Numbers" attribute contains multiple phone numbers separated by a comma, which violates the 1NF rule because it is not atomic. To normalize this table to 1NF, we need to separate the repeating group of phone numbers into a separate table and establish a relationship between them.

So, we can create a new table named "PhoneNumbers" with the attributes CustomerID and PhoneNumber, and remove the "Phone Numbers" attribute from the "Customers" table. The "Customers" table would now have the following attributes:

CustomerID

Name

001

Ram

002

sita

 And, the "PhoneNumbers" table would have the following attributes:

 

CustomerID

PhoneNumber

001

123456789

001

987654321

002

555555555

002

666666666

002

777777777

 By doing this, we have normalized the "Customers" table to 1NF. Now each attribute of the table contains atomic values, and there are no repeating groups of data.


OR

What is DBMS? Explain the benefits and limitations of a centralized database system. (1+4)
Ans: DBMS stands for Database Management System. It is a software system that allows users to create, modify, and manage databases. A DBMS provides a way to store and organize data in a structured and secure manner, making it easier to access and manage data for multiple users and applications.

Common examples of DBMSs include Ms-Access, Oracle, MySQL, Microsoft SQL Server, and PostgreSQL.

Benefits of centralized database system:
  • Centralized control of data
  • Improved data consistency and accuracy
  • Improved security and access control
  • Simplified backup and recovery procedures
  • Reduced data redundancy and storage requirements
  • Reduced costs of managing multiple databases
Limitation of centralized database system:
  • Dependency on a single database server
  • Limited availability and accessibility
  • Increased network traffic and latency
  • Reduced data privacy and confidentiality
  • High cost of maintenance and upgrades
  • Increased risk of data loss or corruption due to system failures.

11. Write a JavaScript program to check whether the given number is odd or even. (5)

Ans:

<html>
<head>
<title>javascript if</title>
<body>
<script>
let num = prompt("Enter a number: ");
if (num % 2 === 0) {
alert(num + " is even.");
}
else {
alert(num + " is odd.");
}
</script>
</body>
</html>


(Using Function in JS)

<html>
<head>
<title></title>
<body>
<script>
// Define a function to check whether a number is odd or even
function checkOddOrEven(number) {
if (number % 2 === 0) {
return number + " is an even number.";
} else {
return number + " is an odd number.";
}
}
// Prompt the user to input a number and pass it to the checkOddOrEven() function
let inputNumber = parseInt(prompt("Enter a number: "));
let result = checkOddOrEven(inputNumber);
// Display the result in an alert box
alert(result);
</script>
</body>
</html>


OR

Write PHP code to create SQL database with server-side scripting. (5)

<?php
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Create database

$sql = "CREATE DATABASE myDB";
if ($conn->query($sql) === TRUE) {
echo "Database created successfully";
} else {
echo "Error creating database: " . $conn->error;
}
$conn->close();
?>

12. What is OOP? List its features and explain any one of them. (1+1+3)
Ans: Object-Oriented Programming (OOP) is a programming paradigm that uses the concept of objects to represent data and the operations that can be performed on that data. It emphasizes modular programming and code reusability by grouping related data and functions into classes, which can then be used to create instances (objects) that inherit the properties and methods of the class.

Following are the features of OOP.
  • Encapsulation
  • Abstraction
  • Inheritance
  • Polymorphism
  • Class
  • Object

Abstraction:

Abstraction in OOP refers to the process of hiding the complexity of an object or system by focusing only on the essential features and ignoring the rest. It allows programmers to create simplified representations of complex real-world problems, making them easier to understand and work with. Abstraction is achieved through the use of abstract classes, interfaces, and methods, which define a set of common behaviors that can be inherited and implemented by subclasses.



13. What is a software development model? Explain about prototype model. (1+4)
Ans: A software development model is a structured approach to software development that provides guidelines for building high-quality software within a specific time frame and budget. It outlines the tasks, activities, and milestones required for the successful completion of a software project. Examples of software development models include the waterfall model, agile model, spiral model, and prototype model.

Prototype Model:

The prototype model is a software development model in which a prototype of the software is developed early in the development life cycle. The prototype is used to gather requirements and feedback from stakeholders, which are then used to refine the requirements and design of the final software product. The model is iterative, meaning the prototype is refined through multiple cycles until it meets the requirements and expectations of the stakeholders.

Merits:
  • Early feedback from stakeholders can identify issues before they become major problems.
  • Iterative nature allows for continuous refinement of the software, leading to a better final product.
  • Helps to reduce development time and cost by identifying issues early in the development life cycle.
Demerits:
  • Can be difficult to manage changes to the software during the iterative process.
  • May require more resources and time for development and testing.
  • Not suitable for projects with fixed or rigid requirements.

14. What is e-commerce? Explain its types. (1+4)

Ans: E-commerce, or electronic commerce, refers to the buying and selling of goods or services over the internet. It involves online transactions between businesses, consumers, or both, using electronic devices such as computers, smartphones, or tablets. E-commerce has revolutionized the way people shop and do business, making it more convenient, faster, and accessible to a wider audience.

Following are the different types of e-commerce.

Business-to-Business (B2B): This type of e-commerce involves transactions between two businesses, such as manufacturers selling to wholesalers or suppliers. B2B e-commerce is typically characterized by larger order quantities, longer-term contracts, and more complex supply chain management.

Business-to-Consumer (B2C): B2C e-commerce involves transactions between businesses and individual consumers. This is the most well-known and common type of e-commerce, and it allows consumers to purchase products and services directly from businesses online.

Consumer-to-Consumer (C2C): This type of e-commerce involves transactions between individual consumers, such as online marketplaces where people can buy and sell products to each other. C2C e-commerce is often facilitated by third-party platforms that provide a safe and secure environment for transactions.

Consumer-to-Business (C2B): In C2B e-commerce, individual consumers offer products or services to businesses. This can include freelance work, consulting services, or product reviews. C2B is often used in the gig economy, where individuals offer their skills or services on a project-by-project basis.

Group ‘C’

Give a long answer to the following question. (2×8=16)

15. What do you mean by LAN topology? Explain Bus, Star and Ring topology with their merits and demerits. (2+6)

Ans: LAN topology refers to the way in which devices are interconnected in a local area network (LAN). The term "topology" describes the physical or logical arrangement of the devices and the way they communicate with one another.

Following are the different types of topologies.

Bus Topology: In a bus topology, all devices are connected to a single communication line, called a bus. Data is transmitted in both directions along the bus, and all devices receive the same data simultaneously.

Advantages:
  • Easy to set up and requires less cabling than other topologies.
  • Well suited for small networks.
  • Inexpensive compared to other topologies.


Disadvantages:
  • Can become slow when many devices are connected to the network.
  • If the bus fails, the entire network fails.
  • Limited distance coverage, and any issues with the cable can cause the entire network to malfunction.
Star Topology: In a star topology, all devices are connected to a central hub or switch. Data is transmitted between devices through the hub or switch.

Advantages:
  • Failure of one device does not affect the entire network.
  • Easy to add or remove devices without affecting the rest of the network.
  • Centralized management makes troubleshooting and maintenance easier.
Disadvantages:
  • Requires more cabling than a bus topology.
  • Failure of the central hub or switch will result in the failure of the entire network.
  • The cost of the central hub or switch can be higher compared to a bus topology.
Ring Topology: In a ring topology, all devices are connected in a circular manner, forming a closed loop. Data is transmitted in one direction around the ring, with each device receiving the data and forwarding it to the next device.

Advantages:

  • No collisions in the network as only one device can transmit at a time.
  • Good for high-performance networks that need to transmit large amounts of data quickly.
Disadvantages:
  • Failure of one device can break the ring and cause the entire network to fail.
  • Adding or removing devices from the network can be difficult.
  • Troubleshooting issues in a ring topology can be more challenging than in other topologies.

16. Write a C program to store registration number , name and marks of 5 students using structure and display them in descending order on the basis of marks. (8)

Ans:

#include <stdio.h>
#include <string.h>
struct student {
int rno;
char name[50];
int marks;
} s[5];
int main() {
int i, j;
struct student temp;
// Input registration number, name, and marks of 5 students
for (i = 0; i < 5; i++) {
printf("\nEnter registration number, name, and marks of student %d:\n", i+1);
scanf("%d %s %d", &s[i].rno, s[i].name, &s[i].marks);
}
// Sort the students in descending order based on marks
for (i = 0; i < 5; i++) {
for (j = i+1; j < 5; j++) {
if (s[i].marks < s[j].marks) {
temp = s[i];
s[i] = s[j];
s[j] = temp;
}
}
}
// Display the sorted list of students
printf("\n\nRegistration Number\tName\tMarks\n");
for (i = 0; i < 5; i++) {
printf("%d\t\t\t%s\t%d\n", s[i].rno, s[i].name, s[i].marks);
}
return 0;
}

OR

Write a program in C to create a data file “score.txt” which stores Student ID, Name, marks of computer until user press yes. After that display all the records of file “score.txt”. (4+4)

#include <stdio.h>
int main() 
{
FILE *fptr;
int id, marks;
char name[50], choice;
// Open the file for writing and reading in truncate mode
fptr = fopen("score.txt", "w+");
do 
{
// Input student ID, name, and marks
printf("Enter student ID, name, and marks for the computer subject:\n");
scanf("%d %s %d", &id, name, &marks);
// Write the student record to the file
fprintf(fptr, "%d %s %d\n", id, name, marks);
// Ask user to input more records
printf("Do you want to enter more records? (y/n): ");
scanf(" %c", &choice);
} while (choice == 'y' || choice == 'Y');

// Rewind the file to the beginning
rewind(fptr);
// Display all records in the file
printf("\nStudent Records:\n\n");
printf("ID\tName\t\tMarks\n");
while (fscanf(fptr, "%d %s %d", &id, name, &marks) == 3) {
printf("%d\t%s\t\t%d\n", id, name, marks);
}
// Close the file
fclose(fptr);
return 0;
}


Conclusion


In conclusion, understanding the NEB question model for Class 12 computer science is crucial for preparing effectively for the board exams. The question model consists of short answer questions, long answer questions, and programming questions, each with a different mark weightage. Students must study fundamental concepts, practice programming, solve previous year's question papers, focus on efficiency and optimization, and stay updated with the latest question model to score well in the board exams.

FAQs


1) What is the total mark weightage for Class 12 computer science board exams?
Ans: The total mark weightage for Class 12 computer science board exams is 50.

2) How many categories of questions are there in the NEB question model for Class 12 computer science?
Ans: There are three categories of questions in the NEB question model for Class 12 computer science: very short answer questions, long answer questions.

3) What are some essential topics for short answer questions?
Ans: Essential topics for short answer questions include programming concepts, data structures, algorithms, database, web technology etc.

4) What are some essential topics for long answer questions?
Ans: Essential topics for long answer questions include programming, networking, database management systems, and web development.

5) How can students prepare effectively for the NEB question model?
Students can prepare effectively for the NEB question model by studying fundamental concepts, practicing programming, solving previous year's question papers, focusing on efficiency and optimization, and staying updated with the latest question model.

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages