4281 Computer Science yt
4281 Computer Science yt
4281 Computer Science yt
Code:4281
NEB-GRADE XII
2080(2023)
Computer Science (New Course)
Marking Schema
Group A:Correct Option ofMultiple-choicequestions (1 Marks for correct option) Full marks: 50
Group B: short answer questions (5 x5 =25) Contents area and marks schema:
Q. No. 10: Explain the Relational Data model with an example.
Full Marks (5) Definition of relational Data model -1 mark.
Use of explanation of any three terminologies; such asrelation, tuple, field, primary key,
domain and integrity constraints -3 marks.
Diagram for relational Data model -1 mark.
Based on the above partial points and concepts will be scored partial marks.
Q. No. 10:OR Write SQL DDL commands to execute the following task with reference to the schema given below:
student_info (regno as integer, name as character (25), class integer, gender character (1), address
character (25).
Full Marks (5) Here's a suggested marking scheme for the given task:
1. Correct syntax and table creation (2 marks):
Allot2 marks if the CREATE TABLE statement is correct and creates a table with
the specifiedtable name, columns, and data types.
2. If column names and data types match the provided schema (1 mark)
3. If column lengths are according to the provided schema(1 mark)
4. Overall structure and readability (1 mark):
Allot1 mark for correctly aligning and formatting with proper indentation and
spacing to the SQL statement.
Note: Data type can be integer or int and character or char.
Q. No. 11: Define a syntax for database connectivity. Write a server-side scripting code to insert data into the
table student having fields (first name, last name, mark, and email:) Assume that server name
="localhost", username ="root", password =" ", database name ="student DB".
Full 1. Give any one syntax for database connection: - 1 mark.
Marks (5) Syntax.: $connection = new mysqli($servername, $username, $password, $database);
Page 1 of 4
Sub.Code:4281
Or
$connection = mysqli_connect($servername, $username, $password, $database);
2.
<?php
// Step 1: Database configuration. -> 1 mark for steps 1 and 2.
E.g.: $servername = "localhost"; $username = "root"; $password = ""; $database =
"studentDB";
// Step 2: Establish a connection to the database.
E.g.: $connection = new mysqli($servername, $username, $password, $database);
Note: Above Steps 1 and 2 can be in a single line.
else {
echo "Error: " . $sql . "<br>" . $connection->error;
}
//Step 6: Close the database connection
E.g.: $connection->close();
?>
Q. No. 11: OR Write a JavaScript code to calculate the factorial of a given number.
Full 1. Correct syntax and its structure: -1 mark.
Marks (5) Award 1 mark if the JavaScript code has the correct syntax and structure, including proper
indentation and formatting.
2. Proper variable declaration and assignment: -1 mark.
Allot1 mark if the code declares a variable to store the factorial result and assigns an initial
value to it.
3. Handling of input and error conditions: -1 mark
Allot1 mark if the code correctly handles input validation and error conditions, such as
checking if the input is a positive integer.
4. Looping and factorial calculation with proper display of the output: -2 marks.
Allot1 mark if the code uses a loop (such as a for loop or a while loop) to calculate the factorial
of the given number and displays the result accurately.
Note: The marking scheme provided is subjective and may vary depending on the specific
requirements or constraints provided by your instructor.
Q. No. 12: How is an event-driven program (or OOP) differing from procedural-oriented programming?
Page 2 of 4
Sub.Code:4281
Explain.
Full 1. Code in the module/function VS class/object – 1 mark.
Marks (5) 2. The OOPs features VS Procedural language features – 2 marks.
3. Code reusability/flexibility/modification concept, data security, etc. – 1 mark.
4. Example of both programming languages – 1 mark.
Above partial points will be scored partial marks.
Q. No. 13: Explain the importance of the system testing of the system development life cycle (SDLC).
Full 1. Define the system testing -1 mark.
Marks (5) 2. Explain the importance of system testing. – 4 marks.
(At least four points or keywords can be included like Validation and verification, Error
Detection and correction, Reliability and Quality Assurance, and Cost and Risk Reduction.)
Above partial points will be scored partial marks.
Q. No. 14: What is cloud computing? Point out the advantage and disadvantage of cloud computing.
Full 1. Definition of cloud computing and example. - 2 Marks.
Marks (5) 2. List of the advantages and disadvantages of cloud computing.-3 marks.
Above partial points will be scored partial marks.
Q. No. 16: Write the advantage of pointer. Write a C-program to enter the radius of a football and find the area
of football by using user-defined function. (3+5)
Full Marks (8) 1. Define the pointer with syntax.–1 mark
2. Write the four advantages of the pointer.– 2 marks.
3. Declaration and preparation of a user-defined function to calculate area on the basis
of radius input. – 3 marks.
4. Execution of function with the proper display of output. – 2 marks.
The above partial concept of a calling function, declaration of a function, and function definition in C
will be scored partial marks.
Q. No. 16: OR Define the structure. Write a C-program using structure to input staff id, name and the salary of 50
staff. Display staff id, name and salary of those staff whose salary range from 25 thousand to 40
thousand.
Full Marks (8) 1. Define the structure:
Definition (2 marks):
Provide a concise definition of a structure in C.
For example: "In C, a structure is a user-defined data type that allows grouping together
related variables of different types. It is defined using the 'struct' keyword followed by the
structure name and a set of curly braces."
The definition is expected with either an example or key feature or purpose as well.
Page 3 of 4
Sub.Code:4281
Proper structure definition (1 mark):
o Proper structure definition and member variables:Award 1 mark if the program
includes a structure definition for storing staff information, including member
variables for staff id, name, and salary.
Input of staff information (1 mark):
o Allot1 mark if the program correctly prompts the user to input the staff id, name,
and salary for each of the 50 staff members.
o The program should store the inputted information in an array or any suitable data
structure.
Display of staff information within salary range with proper filtering and condition
verification (3 mark):
o Allot 1 mark for the proper loop setting to select each staff’s data.
o Allot 1 mark for the proper condition setting for selection of the salary range
between 25,000 and 40,000.
o Allot 1mark for the display of staff recordsmatching the criteria.
The above partial concept of array of structure and use logic in C will be scored partial marks.
Page 4 of 4