0% found this document useful (0 votes)
58 views13 pages

Gr11-Ip-Final 2023

This document contains instructions for a final examination with 5 sections - A to E. Section A contains 18 multiple choice questions of 1 mark each. Section B contains 7 short answer questions of 2 marks each. Section C contains 5 short answer questions of 3 marks each. Section D contains 3 long answer questions of 5 marks each. Section E contains 2 questions of 4 marks each with an internal choice in one question. Programming questions are to be answered using Python and SQL.

Uploaded by

ephream628
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views13 pages

Gr11-Ip-Final 2023

This document contains instructions for a final examination with 5 sections - A to E. Section A contains 18 multiple choice questions of 1 mark each. Section B contains 7 short answer questions of 2 marks each. Section C contains 5 short answer questions of 3 marks each. Section D contains 3 long answer questions of 5 marks each. Section E contains 2 questions of 4 marks each with an internal choice in one question. Programming questions are to be answered using Python and SQL.

Uploaded by

ephream628
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

.

FINAL EXAMINATION, FEB 2023


INFORMATICS PRACTICES
Name: Max. Marks: 70
Class: XI Duration: 3 hrs.
Sec: F,H Date: 23.02.2023
General instructions
1. This question paper contains five sections, A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q34 against part c only.
8. All programming questions are to be answered using Python Language and SQL only.

SECTION A
1 The binary digits 0 and 1,which are the basic units of memory ,are called ___________ [1]
a. Bits b. Bytes c. Nibbles d. Mega Bytes
2 _______________is used to store data ,instructions, and results permanently for future use. [1]
a. Primary memory
b. Secondary memory
c. Main Memory
d. None of the above
3 The software which runs a computer is ? [1]
a. Synchronous Software b. Operating System c. Application Software d. System Software
4 ______________ are required to convert high-level language to machine language. [1]
a. Operating System b. Language translator c. System Utility d. Device driver
5 Which of the following symbol is used to end SQL statements? [1]
a. : b. ; c. , d. ?
6 Which of the following function is used find the address of a variable? [1]
a. function() b. str() c. input() d. id()
7 What will be the data type of the following variable? [1]
A=”101”
a. Integer b. String c. Float d.Boolean
8 Which of the following language uses 0 and 1 for writing instruction. [1]
a.High level language
b.Machine language
c.Assembly language
d.All of the above
9 Write the output of the following [1]
print(range(0,8,2))
a. 0,1,2,3,4,5,6,7,8 b. error c. range(0,8,2) d. 0,2,4,6
10 Identify the odd one out with reference to datatypes in MySQL [1]
a. char(5) b. varchar(5) c. string(5) d. int
11 Keys of dictionary must be _______________ [1]
a. Unique b. Mutable c. integers d. strings
12 Which command is used to remove table from a database? [1]
a. Delete table
b. Drop table
c. Remove table
d. Clear table
13 The column which can uniquely identify each record in a table is called __________ [1]
a. A foreign key b. A primary key c. An identifier d. A candidate key
14 Write the output of the following code [1]
L=[1,2,3,4,5]
for i in L:
print(i, end= " ")
i=i+1
a. [1,2,3,4,5] b. 1 3 5 c. error d. 1 2 3 4 5
15 The __________clause of SELECT query allows us to select only those rows in the results, [1]
that satisfy a specified condition.
a.having b. where c.if d.asc
16 What type of error is returned by the following code [1]
dict={"a":"apple","b":"ball","c":"cat"}
print(dict[1])
a.KeyError b.KeyNotFoundError c.NotFoundError d.Value Error
Q17 and Q18 are ASSERTION AND REASONING-based questions. Mark the correct choice
as
a. Both A and R are true and R is the correct explanation for A
b. Both A and R are true and R is not the correct explanation for A
c. A is True but R is False
d. A is false but R is True
17 Assertion (A):- Operating system is a system software [1]
Reasoning (R):- A system software is a collection of programs designed to operate, control,
and extend the processing capabilities of the computer itself.(a)
18 Assertion (A): - Compiler and Interpreter are known as language processors [1]
Reasoning (R):- A language processor converts programs from object code to source code©
SECTION B
19 a.Ms. Mirana wants to remove the entire content of a table "BACKUP" along with its [2]
structure
to release the storage space. What MySql statement should she use?
Drop table BACKUP;
b. Sharmila wants to make the database named ‘COMPANY’ active. Write the MySQL
commands for it.
Use COMPANY;
20 a.What is the difference between DDL and DML command?Give examples for each [2]
DDL:
DDL is Data Definition Language which is used to define data structures. For example: create
table, alter table are instructions in SQL.
DML:
DML is Data Manipulation Language which is used to manipulate data itself. For example:
insert, update, delete are instructions in SQL.

b. Mrs. Sharma is the class teacher of Class ‘XII A’ .She wants to create a table ‘Student’
to store details of her class.
a) Which of the following can be the attributes of Student table?
a) RollNo b) “Amit” c) Name d) 25
b) Name the Primary key of the table ‘Student’. State the reason for choosing it.
RollNo
OR
a.Write one similarity and one difference between CHAR and VARCHAR data types.
Both are used for storing non-numeric data.
Char
Used for fixed-length string.
Padded to the specified length when stored
Varchar
Used for variable length string
No padding takes place

c. What is the significance of “%” and ‘_’ characters?


% Represents zero or more characters
_ Represents a single character

21 a.Differentiate between Compilers and Interpreters [2]


A Compiler takes a program as a whole.
An Interpreter takes single lines of a code.
b. Are the following expressions given below different? Justify your answer
i) ans=8 ii) ans==8
ans = 8 is an assignment that puts 8 into ans while ans == 8 is a relational operation that
checks if ans is equal to 8.
22 a.What do you mean by Data Redundancy? How this can be solved? [2]
Data redundancy is a condition created within a database or data storage technology in which
the same piece of data is held in two separate places.
Primary key
b.When a column’s value is skipped in an INSERT command, which value is inserted in the
database?
NULL
23 In MySQL Reena and Zebi are getting the following output of SELECT statement on the [2]
column Location of table EMPLOYEE.Which keyword has Zebi used with the select
statement to get the below output. Write the query.

Ans:Distinct
Select Location from EMPLOYEE;
Select distinct Location from Employee;
24 Write a program to obtain principal amount, rate of interest and time from user and calculate [2]
and display simple interest.
p = float(input("Enter principal: "))
r = float(input("Enter rate: "))
t = float(input("Enter time: "))
si = p * r * t / 100
print("Simple Interest =", si)
25 What will this code print? [2]
a. aList = [4, 8, 12, 16]
aList[1:3] = [20, 24, 28]
print(aList)
[4, 20, 24, 28, 16]
b. sampleList = [10, 20, 30, 40]
del sampleList[0:6]
print(sampleList)
[]
SECTION C
26 a. Write a program to take as an input, a 2 digit number. Reverse the digits eg: 25 is [3]
reversed to 52
x = int(input("Enter a two digit number: "))
y = x % 10 * 10 + x // 10
print("Reversed Number:", y)
b. Write a python program to find the Fibonacci series of numbers till 25.Some initial
elements of the series are: 0 1 1 2 3 5 8 . . . . . . .
# Program to display the Fibonacci sequence up to n-th term

nterms = int(input("How many terms? "))

# first two terms


n1, n2 = 0, 1
count = 0

# check if the number of terms is valid


if nterms <= 0:
print("Please enter a positive integer")
# if there is only one term, return n1
elif nterms == 1:
print("Fibonacci sequence upto",nterms,":")
print(n1)
# generate fibonacci sequence
else:
print("Fibonacci sequence:")
while count < nterms:
print(n1)
nth = n1 + n2
# update values
n1 = n2
n2 = nth
count += 1
27 Write Query statements for the following transactions: [3]
a. To change the existing column name ENAME of table Employee to EMP_NAME.
Alter table Employee change ENAME EMP_NAME varchar(30);
b. Write a query to delete the DESIG column of the EMPLOYEE table.
Alter table EMPLOYEE drop DESIG;
c. What is the following query doing?
ALTER TABLE Persons DROP PRIMARY KEY;
Will delete the primary key constraints
28 Write the difference between ALTER TABLE and UPDATE command in SQL? Give [3]
examples for each.
ALTER command is Data Definition Language (DDL).
Alter command will perform the action on structure level and not on the data level.
ALTER Command is used to add, delete, modify the attributes of the relations (tables) in the
database.
UPDATE Command is a Data Manipulation Language (DML).
Update command will perform on the data level.
UPDATE Command is used to update existing records in a database.
29 Given the following table: CLUB [3]
CName Age Sports DateofJoin Pay
Coachid

1 Ashok 35 Karate 2019-03-11 2000

2 Tushar 34 Karate 2020-02-15 2500

3 Chetan 34 Swimming 2020-07-22 2400

4 Jagdeep 33 Squash 2018-02-06 2450

5 Sudhir 37 Swimming 2019-06-18 2750

Write queries to:


a. To show all information about the swimming coaches in the club.
Select * from CLUB where Sports=”Swimming”;
b. To display the details of those sports with Coach names ending with ‘r’.
Select Sports,CName from CLUB where CName like “%r”;
c. To change the sport from Squash to Basket Ball.
Update CLUB set Sports=”Basketball” where Sports=”Squash”;
d. Display the age of coaches teaching the sport ‘Karate’.
Select Age from CLUB where Sport=”Karate”;
e. Sort the table in ascending order of DateofJoin
Select * from CLUB order by DateofJoin ASC;
f. Delete all the records of the ‘CLUB’ table
Delete from CLUB;
OR

Write python code for the following.


a. Input any 10 numbers in a list ,find even and odd numbers and display in two different
lists.
Eg: L=[7,9,10,8,2,5,3,12,4,6]
Output:
Even=[10,8,2,12,4,6]
Odd=[7,9,5,3]

l=[]
n=int(input("limit"))
for i in range(1,n+1):
num=int(input("elements"))
l.append(num)
print(l)
e=[]
o=[]
for i in L:
if i%2==0:
e.append(i)
else:
o.append(i)
print(e)
print(o)

b. To calculate Grade ,percentage and total marks of 5 subjects of any student assume that
maximum marks for each subject is 100.Grade calculation criteria is given below.Accept
marks scored for each subject from the user.
print("Enter the marks of five subjects::")

subject_1 = int(input ())


subject_2 = int(input ())
subject_3 = int(input ())
subject_4 = int(input ())
subject_5 = int(input ())
total, percentage=0
total = subject_1 + subject_2 + subject_3 + subject_4 + subject_5
percentage = (total / 500.0) * 100
if percentage >= 90:
grade = 'A'
elif percentage >= 80 and percentage < 90:
grade = 'B'
elif percentage >= 70 and percentage < 80:
grade = 'C'
elif percentage >= 60 and percentage < 70:
grade = 'D'
else:
grade = 'E'
print ("\nThe Total marks is: \t", total)
print ("\nThe Percentage is: \t", percentage, "%")
print ("\nThe Grade is: \t", grade)
30 Write the difference between [3]
a. RAM and ROM

b. Source code and Object code


OR
a. Draw block diagram of a computer and explain its components and interconnection

SECTION D
31 Find error in the following code(if any) and correct code by rewriting code and underline the [5]
correction
a. x= int(“Enter value of x:”) // x= int(input(“Enter value of x:”))
for in range [0,10]: // for in range (0,10):
if x=y // if x==y :
print( x + y)
else:
print( x‐y)
b. a, b = 0
if (a == b) :
c=a+b
print( c)

c. Number=250
while Number<=1000:
if Number>=750:
print (Number)
Number=Number+100
else:
print( Number*2)
Number=Number+50
d. i=1
a=int(input("ENTER FIRST NUMBER"))
for i in range(1, 11):
print(a,"*=", i ,"=",a * i)
e. Val=25
for I in the range(0,Val)
if I%2==0:
print( I+1)
else:
print (I‐1)
OR
Identify the errors in the following query
a. Select * from Student where Name is NULL;
b. Select * from employee where salary between 1000 and 2000;
c. Select * from employee where name like “A%”;
d. Update student set Name = “Sumita” where admno = 1234;
e. UPDATE Student SET fees= fees+500;
32 Write SQL Commands for the questions form (a) to (j) on the basis of table Teacher. [5]
Table :Teacher
Name Age Department Dateojjoin Salary
Jugal 24 Computer 2007-02-10 12000
Shanti 31 History 2008-03-24 20000
Sandeep 32 Maths 2009-02-25 14000
Sangeeta 45 History 2007-04-15 20000
Rahat 55 Computer 2007-05-17 21000
a. To show all information about the teachers of History department in descending order
of their name.
SELECT * FROM teacher WHERE department= “History”;
b. To list the names of teachers who are in Maths department.
SELECT name FROM teacher WHERE department= “Mathematics” AND gender=
“F”;
c. To display Name, Salary, where age less than 25 and age equal to or more than 45.
Select name,salary from TEACHER where age<25 and age>=45;
d. Update the Salary by increasing Rs. 1000 for teachers with age more than 55.
Update TEACHER set salary=salary+1000 where age>55;
e. To Insert a new record in table Teacher with the following data
‘Raja’, 23, ‘Hindi’, ‘2005-08-19’,12675.
Insert into TEACHER values(‘Raja’, 23, ‘Hindi’, ‘2005-08-19’,12675)
f. Write a SQL command to add following column in above table.
Column Name Data Type Size
Address Varchar 40
Alter table TEACHER add Address varchar(40);
g. Display the names of those teachers whose names starts with alphabet ‘S’;
Select Name from TEACHER where name like “%S”;
h. To Delete those records where Department is History.
Delete from TEACHER where department=”History”;
i. Delete all the records from the table Teacher.
Delete from TEACHER;
j. To drop the table Teacher.
Drop table teacher;
33 [5]

Write SQL Commands for the questions on the basis of the table Item
a. Display all items information.
Select * from Item;
b. Display item name and price values alone .
Select Iname,price from Item;
c. Display all soap information.
Select * from Item where Iname=”soap”;
d. Display the item information whose name starts with letter 's'.
Select Iname from Item where Iname like “s%”;
e. Display a report with item number, item name and total price. (total price = price *
quantity).
Select Itemno,Iname ,price=price*quantity as total price from Item;
f. Display item table information in ascending order based upon item name.
Select * from Item order by Iname asc;
g. Display item name and price in descending order based upon price.
Selct Iname,price from Item order by price desc;
h. Display item name, whose price is in between 50 to 100.
Select Iname from Item where price between 50 and 100;
i. Add new column total price with decimal (10, 2).
Alter table Item add total_price decimal(10,2);
j. Increase price value by 100
Update Item set price=price+100;
SECTION E
34 a. Write a python program to find the factorial of a number. Accept the number as user [1+1+2]
input.
# Python program to find the factorial of a number provided by the user.
# change the value for a different result
num=int(input("enter the number"))

# To take input from the user


#num = int(input("Enter a number: "))
factorial = 1

# check if the number is negative, positive or zero


if num < 0:
print("Sorry, factorial does not exist for negative numbers")
elif num == 0:
print("The factorial of 0 is 1")
else:
for i in range(1,num + 1):
factorial = factorial*i
print("The factorial of",num,"is",factorial)
b. Write a program to display the multiplication table of a number.The number should be
accepted as user input.
# Multiplication table (from 1 to 10) in Python

#num = 12

# To take input from the user


num = int(input("Display multiplication table of? "))

# Iterate 10 times from i = 1 to 10


for i in range(1, 11):
print(num, 'x', i, '=', num*i)
c. Write the output for the following codes.
a) A={10:1000,20:2000,30:3000,40:4000,50:5000}
print (A.items())
print (A.keys())
dict_items([(10, 1000), (20, 2000), (30, 3000), (40, 4000), (50, 5000)])
dict_keys([10, 20, 30, 40, 50])

b) list = [10, 20, 30, 40, 50, 60]


print ( list [::2] )
print ( list [::-1] )
print ( list [-4:] )
print ( list [:3] )
[10, 30, 50]
[60, 50, 40, 30, 20, 10]
[30, 40, 50, 60]
[10, 20, 30]
OR(Option for Qn. c only)
Write a Python program to print first 10 integers and their squares like
11
24
3 9 and so on
n=10
print("enter the numbers")
for i in range(1,n):
print(i, i**2)
35 Define the following [4]
a. Big data
Big data primarily refers to data sets that are too large or complex to be dealt with by
traditional data-processing application software. Data with many entries offer greater
statistical power, while data with higher complexity may lead to a higher false
discovery rate
b. Immersive experience
An immersive experience describes the perception of being surrounded by – and being
a part of – a different environment than our normal day to day
c. NLP
Natural language processing is an interdisciplinary subfield of linguistics, computer
science, and artificial intelligence concerned with the interactions between computers
and human language
d. IoT
The term IoT, or Internet of Things, refers to the collective network of connected
devices and the technology that facilitates communication between devices and the
cloud, as well as between the devices themselves

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy