Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Sample Paper 14 IP

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

INFORMATICS PRACTICES (065)

SAMPLE PAPER
Class: XI
Time: 3 HOURS M.M.: 70
General Instructions:
1. This question paper contains five sections, Section 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 Q35 against part c
only.
8. All programming questions are to be answered using Python Language only.

Section A consists of 18 questions of 1 mark each.


Question 1. In …………… memory, once the program or data is written, it cannot be changed? [1]
(A) EEPROM (B) PROM (C) EPROM (D) None of these
Answer: (B) PROM
Explanation: In Programmable Read-Only Memory (PROM), if there is an error in writing instructions
or data, the error cannot be erased. PROM chip becomes unusable.

Question 2. ……………. is a network of devices that have an embedded hardware and software to
communicate (connect and exchange data) with other devices on the same network. [1]
(A) DBMS (B) IoT (C) SaaS (D) NLP
Answer: (B) IoT
Explanation: Internet of Things (IoT) is a network of devices that have an embedded hardware and
software to communicate (connect and exchange data, with other devices on the same network.

Question 3. CPU memory is also called: [1]


(A) High speed memory (B) Cache
(C) Both (A) & (B) (D) None of these
Answer: (C) Both (A) & (B)

Question 4. The Describe command: [1]


(A) Creates a table (B) Shows structure of a table
(C) Adds a record (D) Deletes a record
Answer: (B) Shows structure of a table
Explanation: The describe command displays structure of a table.

Question 5. The ………… clause is used to arrange records of a table. [1]


(A) Alter (B) Order (C) Structure (D) Order by
Answer: (D) Order by
Explanation: The order by clause arranges records of a table in ascending or descending order.

Question 6. …………… is a system that allows a group of connected computers to maintain a single
updated and secure ledger which is updated only after all the nodes in the network authenticate the
transaction. [1]
(A) P2P (B) Client Server (C) DBMS (D) Blockchain
Answer: (D) Blockchain
Explanation: Blockchain is a system that allows a group of connected computers to maintain a single
updated and secure ledger which is updated only after all the nodes in the network authenticate the
transaction.

Page 1 of 9
Question 7. Which one of the following is not a keyword in Python language? [1]
(A) Pass (B) Eval (C) Assert (D) Nonlocal
Answer: (B) Eval
Explanation: Eval can be used as a variable.

Question 8. A condition or check applicable on a field or set of fields [1]


(A) Constraint (B) Keyword (C) Clause (D) None of these
Answer: (A) Constraint
Explanation: Constraint is a condition or check applicable on a field or set of fields.

Question 9. Which of the following is not a feature of MySQL: [1]


(A) Free (B) Portable (C) Case sensitive (D) Supports query language
Answer: (C) Case sensitive
Explanation: MySQL is not case sensitive language.

Question 10.Which of the following is true for variable names in Python? [1]
(A) Underscore and ampersand are the only two special characters allowed
(B) Unlimited length.
(C) All private members must have leading and trailing underscores.
(D) None of the mentioned
Answer: (B) Unlimited length.
Explanation: Variable names can be of any length.

Question 11. A table can have maximum of primary keys : [1]


(A) 1 (B) 2 (C) 3 (D) Multiple
Answer: (A) 1
Explanation: A table can have only one primary key.

Question 12. What will be the output of the following code : [1]
162//55 + 78%4 + 12**2
(A) 149 (B) 147 (C) 142 (D) 148
Answer: (D) 148
Explanation: 162//55 + 78%4 + 12**2  2 + 2 + 144  148

Question 13. Which of the following is not an example of robotics? [1]


(A) Sophia (B) Drone (C) CRAY (D) Both A & B
Answer: (C) CRAY

Question 14. A key that links multiple tables is called? [1]


(A) Foreign key (B) Primary key (C) Candidate key (D) Alternate key
Answer: (A) Foreign key
Explanation: A foreign key is a column or set of columns that allow us to establish a referential link
between the data in two tables.

Question 15. Which of the following can be used as valid variable identifiers in python and why? [1]
(A) Total (B) > sumNum (C) lQuestion (D) Addition-2
Answer: (A) Total
Explanation: An identifier cannot begin with a special symbol and also it can’t be a keyword.

Page 2 of 9
Question 16. …………. is designed to solve a specific problem or to do a specific task. [1]
(A) Application Software (B) System Software (C) Utility Software (D) User
Answer: (A) Application Software
Explanation: An application program (application or app for short) is a computer program designed to
carry out a specific task other than one relating to the operation of the computer itself, typically to be
used by end users.

Directions (Q17 and Q18): In the following questions, a statement of Assertion (A) is followed by a
statement of Reason (R). Mark the correct choice.
Question 17. Assertion (A): A computer can process all instructions that are programmed in it and can
is superior to humans in executing them.
Reason (R): Human beings can think and program, the machine cannot think. [1]
(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
Answer: (B) Both A and R are true but R is NOT the correct explanation of A

Question 18. Assertion (A): Operator is a type of Token.


Reason (R): Identifier starts with alphabet or underscore. [1]
(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
Answer: (B) Both A and R are true but R is NOT the correct explanation of A

Section B consists of 7 questions of 2 marks each.


Question 19. Write the advantage and disadvantage of script mode. [2]
OR
Differentiate between interactive mode and script mode.
Answer:
Advantage : Editing your script is easier in script mode.
Disadvantage : Before execution of the code, it must be saved as a file.
OR
Differences between interactive mode and script mode are as:
Interactive Mode Script Mode
(i) In interactive mode, the result is returned (i) In script mode, a file must be created and
immediately after pressing the Enter key. saved before executing the code to get
results.
(ii) You are not provided with direct way of (ii) You are provided with a direct way of
editing your code editing your code.

Question 20. Write the following mathematical equation as Python expressions. [2]
(i) 3𝑥 3 + 4𝑥 2 + 5x + 7
a+b+c
(ii) Y = 3
Answer:
(i) 3* (x**3) + 4*(x**2) + 5*x + 7)
(ii) y = (a + b + c)/3
Page 3 of 9
Question 21. What is the original purpose of SQL? [2]
Answer: (A) to specify the syntax and semantics of data definition language
(B) To specify the syntax and semantics of data manipulation language
(C) To define the data structures

Question 22. Give the output of the following with justification : [2]
x=3
x+=x–x
print (x)
Answer:
Output: 3
Working: x = 3
x = x + (x – x) = 3 + (3-3) = 3

Question 23. What is a public cloud? Give few examples of Public cloud. [2]
Answer: Public cloud refers to a common cloud service made available to multiple subscribers.
Examples of public cloud are : Microsoft Azure, Google drive, Amazon cloud Drive, icloud.

Question 24. Write a code in python to input a list of names from the user and display the names whose
length is more than 5. [2]
Answer:
Lstn=eval(input("Enter names in list format :"))
count=0
for n in Lstn:
if len(n) > 5:
print(n)
count+= 1
print("No. of names of length more than 5 is :",count)
Output:
Enter names in list format :['Olivia', 'Amelia', 'Emma', 'Sophia','Eva']
Olivia
Amelia
Sophia
No. of names of length more than 5 is : 3
Question 25. What are Python data types? [2]
Answer: Python data types are used to define the types of a variable. Any values that are represented
in quotes (double or single) are string data type. Number without decimal point is integer data type.
Python has 5 built-in core data types as (i) Numbers, (ii) String, (iii) List, (iv) Tuple, (v) Dictionary

Section C consists of 5 questions of 3 marks each.


Question 26. Consider the table Accessories given below and write SQL queries: Table: Accessories[3]

Page 4 of 9
(i) Display name and price of all accessories in ascending order of their price.
(ii) To display names of accessories whose name ends with “d” and price is above 1000.
(iii) To increase the price of accessories by 200 whose name has “b” somewhere in between.
OR
Write queries with respect to the table Hospital given below: Table: Hospital

(i) Display details of “Ortho” department patient in descending order of names.


(ii) Add a new column Docname varchar(20) to the table.
(iii) Delete records of patients whose name starts with “A”
Answer:
(i) Select Name,Price from Accessories order by price;
(ii) Select Name from Accessories where Name like “%d” and price >1000;
(iii) Update Accessories set price=price+200 where name like “%b%”;
OR
(i) Select * from hospital where Dept=”Ortho” order by Pname desc;
(ii) Alter table Hospital Add Docname varchar(20);
(iii) Delete from hospital where Pname like “A%”;

Question 27. What will be the output of the following statements? [3]
(i) list1 = [12,32,65,26,80,10]
list1.sort( )
print (list1)
Answer:
[10, 12, 26, 32, 65, 80]
(ii) list1 = [1,2,3,4,5]
list1 ([len (list1) -1])
Answer:
5
(iii) list1 = [1,2,3,4,5,6,7,8,9,10]
print(list1 [::-2])
print(list1 [:3] + list1 [3:])
Answer:
[10,8,6,4,2]
[1,2, 3,4,5, 6, 7,8,9,10]

Question 28. Differentiate Alter and Update commands in SQL. [3]


Answer:
Alter Update
(i) It belongs to DDL category (i) It belongs to DML category
(ii) It changes the structure of the table (ii) It modifies data of the table.
(iii) Columns can be added, modified, deleted (iii) Data can be changed, updated with values
etc. and expressions.

Page 5 of 9
Question 29. Explain the use order by clause. [3]
OR
Write most appropriate data types for the following columns of a Book table in a database storing data
of books. (A) Bookname, (B) Date of publication, (C) Price
Answer: The order by clause is used to arrange the records in ascending or descending order. Data
present in a table can be arranged as per requirement on a specific field in ascending or descending
order. The default is ascending order. To arrange in descending order the DESC clause is to be used. To
arrange in ascending order ASC may be used.
Example ” Select * from Employee order by EMP_ SALARY DESC;”
The above command arranges the records in descending order of salary.
OR
(A) Varchar, (B) Date, (C) Decimal/Numeric

Question 30. Write a program to input Roll and name of as many students and create a dictionary from
the details entered. Each entry should have roll as key and name as value. Also display the dictionary.
[3]
Answer:
Studict={ }
ans='y'
while ans=='y':
r=input("Enter Roll:")
n=input("Enter name :")
Studict[r]=n
ans=input("Add more(y/n)")
print(Studict)

Section D consists of 2 questions of 4 marks each.


Question 31. Write SQL queries for the table given below:

(i) Display Name and SID of “Male” customers.


(ii) Display details of customers of NORTH area whose name ends with “A”
(iii) Update the table to change AREA to SOUTH for all FEMALE customers
(iv) Remove records of customers having Sil) 104.
Answer:
(i) Select Cname, SID from Customer where ‘Gender=”MALE”;
(ii) Select * from Customer where Area=”NORTH” and Cname like “%A”;
(iii) Update Customer Set AREA=”SOUTH” where gender=”FEMALE”;
(iv) Delete from customer where SID=104;

Page 6 of 9
Question 32. Answer the following questions.
(i) What will be the output for the following Python statement?
L = [10, 20, 30, 40, 50]
L=L+5
Print(L)
(ii) What will be the output of the following python code?
L=[10, 20]
L1 = [30, 40]
L2 = [50, 60]
L.append(L1)
L.extend(L2)
Print(L)
(iii) Find the output
>>>L1=[1, 2, 3, 4]
>>>L2=[2, 3, 4, 5]
>>>L1 > L2
OR(Option for iii only)
Predict output of the following:
L = [10,12,2,22,19,40]
L[2] = 14
L.insert(3, 11)
del L[4:5]
print(L)
Answer:
(i) Error
(ii) [10,20, [30,40], 50,60]
(iii) False
OR(Option for iii only)
[10,12,14,11,19,40]

Section E consists of 3 questions of 5 marks each.


Question 33. Write SQL query for the questions that follow based on given table Worker [5]

(i) To display Name and joining date of workers whose salary is greater than 10000.
(ii) To display details of those workers whose name started with ‘N’.
(iii) To display all workers details from worker table order by Name ascending.
(iv) To display Name and Salary of those workers who work in ‘HR’ or ‘Admin Department.
(v) To display the total number of workers who work in Accountant department.
OR
Page 7 of 9
Consider the table Hospital storing details of patients as follows table Hospital

Write SQL commands for (i) – (v)


(i) To create the table with appropriate data types.
(ii) To display only the names and departments of patients of “ENT”.
(iii) To increase the charges of all departments by 20%.
(iv) add a new column Phone of type decimal.
(v) Remove the entire table.

Answer:
(i) SELECT Name, joining_Date FROM Workers WHERE Salary > 10000;
(ii) SELECT * FROM workers WHERE Name LIKE ‘N%’;
(iii) SELECT * FROM worker ORDER BY Name ASC;
(iv) SELECT Name, Salary FROM Worker WHERE Department IN (‘HR’, Admin’);
(v) SELECT COUNT() FROM Worker WHERE Department = , ‘Accountant’;
OR
(i) Create table Hospital(Patid char(5),Pname varchar(30),Dept varchar(20), charges int, Dtofadm
Date);
(ii) Select Pname, Dept from Hospital where Dept=”ENT”;
(iii) Update Hospital set charges = charges + charges *0.2;
(iv) Alter table Hospital ADD Phone integer;
(v) Drop table Hospital;

Question 34. What are the major components of a computer system? How do different components of a
computer communicate with each other ? [5]
Answer: The computer system comprises of the following major components:
(A) Processor, (B) Main Memory, (C) Buses, (D) ALU, (E) CU, (F) I/O Units
 A computer system primarily comprises of different components such as central processing unit,
input/output devices and memory unit.
 All these components function together as a single unit to deliver the desired result.
 Input devices send the data or information through keyboard, mouse, scanner, etc.
 CPU transfers instructions and input data from main memory to registers.
 Output unit sends the processed results to the user.
 Memory unit is responsible to store processed results on a temporary or permanent basis.

Question 35. Write a program to input a sentence and using a list display the words that have even
number of vowels. [5]
OR
Write a Python program to find the list of words that are longer than n from a given list of words.
Answer:
sen= input("Enter sentence:")
Lst=sen.split(' ')

Page 8 of 9
count=0
for wrd in Lst:
for ch in wrd:
if ch in 'aeiou' or ch in "AEIOU" :
count+=1
if count%2==0:
print(wrd)
count=0
OR
while True:
print('-'*100)
str=input("Enter a sentence : ")
n=int(input("Enter the highest length : "))
words = str.split(" ")
for word in words:
if len(word)>=n:
print(word)

Page 9 of 9

You might also like