0% found this document useful (0 votes)
33 views5 pages

Class XI Informatics Practice Exam 2023-24

Uploaded by

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

Class XI Informatics Practice Exam 2023-24

Uploaded by

Debasis Palai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UTTARAKHAND PUBLIC SCHOOL

PRE-ANNUAL -2023-24
CLASS XI – SET-A
SUBJECT- INFORMATICS PRACTICE -065
Time- 3 Hrs M.M -70
General Instructions:
 The paper is divided into 4 Sections- A, B,C.
 Section A, consists of Question 1 to 20 Contains 1 Marks each.
 Section B, consists of Question number 21 to 30 contains 2 Marks each
 Section C, consists of Question number 31 to 35 Contains 3 Marks each.
 Section D, consists of Question number 35 to 38 contains 5 Marks each.
 All questions compulsory.
SECTION-A(Multiple Choice Questions)

1- for i in range([Link]):
print(i,end=”“)
(a)0 (b) 0,1,2,3,4,5,6,7,8,9,10 (c) 0,2,4,6,8 (d) 0,2,4,6,8,10

2- You have the following code segment:


String1 = "python"
String2 = "world"
print(String1 + string2) What is the output of this code?
(a) python world (b) world (c) pythonworld (d)python

3- Suppose List1 = [32,45,78,57,-12,29]what is the output of len(List1)?


a. 5 b. 6 c. -12 d. 0

4- Shivam wants to see the table structure in Mysql. Select an appropriate command to
help him.
a. use b. show [Link] [Link]

5- Which of the following will give output as [5,14,6] if lst=[1,5,9,14,2,6]?


a. print(lst[0::2]) b. print(lst[1::2]) c. print(lst[Link]) d. print(lst[Link])

6- IoT stands for_______


a. Industry of Things b. Internet of Things
c. Intelligence of Things d. Internal Internet of Things

7- Consider a list L = [3, 4, 5, 20, 5, 25, 1, 3], what will be the output of [Link]()?
a. [3, 4, 5, 20, 5, 25, 1, 3] b. [1, 3, 3, 4, 5, 5, 20, 25]
c. [25, 20, 5, 5, 4, 3, 3, 1] d. [3, 1, 25, 5, 20, 5, 4, 3]

8- Which of the following is valid membership operator?


(a) in (b) not in (c) both a and b (d) none of the above

9- Choose the correct output


a,b=10,11
c=str(b)+str(a)
print(c)
a. 21 b. 1011 c. 1110 d. Error

10- If list=[10,20,30]
>>>list*2
(a) [10,20,30] (b) [10,20,30,10,20,30] (c) [20,40,60] (d) list

11- Which of the following will give error?


Suppose dict1={"a":1,"b":2,"c":3}
a. print(dict[“c”]) b. print([Link]("b")) c. dict1["a"].update(5) d. None of the above.

12- What is the output of the following code snippet?


L = [-789,765,400,-1411,-5446,2]
print(min(L))
a. 2 b. -789 c.- 5446 d. 400

13- if var1= “HELLO WORLD”


>>>print(var1[-8])
(a) H (b) O (c) l (d) L

14- The___ allows you to perform tasks related to data definition.


a. DDL b. DML c. TCL d. None of these

15- Duplication of data is termed as_____.


a- Database inconsistency b- Data Redundancy c- Data Integrity d- Data Consistency

16- Which of the following operator is Floor division?


(a) + (b) / (c) // (d) **

17- What will be the output of the following code?


x,y=3,5
x,y=y,x+2
print(x,y)
(a) 5 5 (b) 3 5 (c) 5 3 (d) 3 3

18- The rows of the relations are generally referred to as ________.


a- Degree b- Tuples c- Attributes d- Cardinality

19-Find the output of the following python program:


for x in range(1,20,3):
print(x)
(a) 1,20,3 (b) 1,4,7,10,13,16,19 (c) 13,6,9,12,15,18 (d) 20,40,60,80,100

20-Where is virtual reality used?


a- Training soldiers in combat using battlefield simulations.
b- In 3D films
c- To allow access to buildings
d- To create prototypes of cars or any other object.

SECTION-B(2 Marks each)


21- Identify the invalid identifier-
1- unit-day
2-4gh
3-for
4-#sum

22- Write the output of the following-


a- (75>2**5)
b- (25!=5*2)

23- What is the difference between primary key and foreign key explain with proper
example?

24- Design a dictionary using following table information.


Deptno Dname Location
10 English I floor
11 Physics I floor
12 Chemistry II floor
13 Biology II floor
14 Computers III floor

25- Write the output of the following:


a- Type(20)
b- Type(20.0)
c-Type(‘20’)
d-Type(True)

26-Write a program to check whether a number is divisible by 7 or not

27- Describe the benefits of cloud computing.

28- Write a SQL code to create table ITEM and insert values with proper coding.
Item_no Item_name Qty
101 Pen 560
102 Pencil 780
104 CD 450
109 Long file 350
105 Eraser 250
103 Duster 128

29- What will be the output of the following operation?


L1=[1,2]
L2=[3,4]
a- print((L1+L2)*2)
b- [Link](8,2)

30- Find out the error in the following code-


x=int(“enter value of x:”))
for in range[0,11]:
if x=y
print x+y
else:
Print x-y
SECTION-C (3 Marks each)
31- Table : client
C_ID ClientName City P_ID Price
1 Cosmetic Shop Delhi FW05 40
6 Total Health Mumbai BS01 45
12 Live Life Delhi SH06 55
15 Pretty One Delhi FW05 120
16 Dreams Bengaluru TP01 95
14 Expressions Delhi Null 50
Write SQL statements for the query (a) to (c)
a- To display client name and city of all Mumbai and Delhi based clients .
b- Increase the price of all the value by 10%
c- Delete the client whose belongs to Mumbai.

32- Explain the following along with their applications:


a- Artificial Intelligence
b- Machine Learning

33- Write a program to input your friend names and their phone numbers and store
them in a dictionary as the key value pair. Perform the following operations on the
dictionary.
a- Display the names and phone numbers of all your friends.
b- Delete the particular friend from the dictionary.
c- Add a new key value pair in this dictionary and display the modified dictionary.

34- Write a program to calculate the electricity bill (accept number of unit from user)
according to the following criteria.

35- Write the output of the following code:


L1=[2,4,6,8,10]
L2=L1
L3=[Link]()
L1[4]=12
L2[3]=14
[Link](2)
Print(“List1”,L1)
Print(“List2”,L2)
Print(“List3”,L3)

SECTION-D (5 Marks each)


36- Write SQL commands for (i) to (v) on the basis of relation given below: (5)
Table: BOOKS
Book_id Book_name Author_name Publishers Price Type qty
K0001 Let us C [Link] EPB 450 Comp 15
P0001 Genuine [Link] FIRST 755 Fiction 24
PUBL.
M0001 Mastering [Link] EPB 165 Comp 60
C++
N0002 VC++ [Link] TDH 250 Comp 45
advance
K0002 Programming Sanjeev FIRST 350 Fiction 30
with python PUBL.
(i) To show the books of FIRST PUBL. written by [Link].
(ii) To display cost of all the books published by FIRST PUBL.
(iii) Depreciate the price of all books of EPB publishers by 5%.
(iv) To display the book name, price of the books more than 3 copies of which have been
issued..
(v) To show the details of the book with quantity more than 30.
37- Find the output of the following: (5)
(i) 4**4

(ii) print(‘Im’,16’,’Years old’)

(iii) N=”Good”+”Morning”
print(N)

(iv) x,y=20,60
y,x,y=x,y-10,x+10
print(x,y)

(v) x=10
x=x+10
x=x-5
print(x)

38- (i) l=[‘p’,’w’,’r’,’d’,’a’] (2)


[Link](‘r’)
print(l)
print([Link]())
del l[1]
print(l)
(ii) l=[1,2,3,4,5,6,7,8,9,10] (1)
s=[I for I in l if I%2==0]
print(s)
(iii) Consider code in python: (1)
Remove last three elements from the list.
(iv) l=[24,34,13,67,54,89,43] (1)
print(max(l)

Common questions

Powered by AI

The syntax for 'for i in range(0, 10, 2):' is utilized to loop through a sequence of numbers starting from 0 up to (but not including) 10, with a step of 2. This means the loop iterates at every second number within the range starting from 0, generating the sequence 0, 2, 4, 6, 8 as output . The range function creates an arithmetic progression that a for-loop traverses, which in this case skips one item between each number due to the step value of 2.

String concatenation in Python using the '+' operator combines two strings directly. Hence, given 'String1 = "python"' and 'String2 = "world"', the expression 'String1 + String2' will result in 'pythonworld' . A common pitfall is case sensitivity and correct usage of variable names; referring to 'string2' instead of 'String2' would cause an error since Python is case-sensitive . Another issue might be neglecting to add a space if desired after concatenation, which would need to be manually included, e.g., 'String1 + " " + String2'.

To depreciate the price of a book by a specific percentage in SQL, you would employ the UPDATE statement to modify the price column based on a calculated percentage. For example, to decrease the price of all books published by EPB publishers by 5%, the SQL command would be: 'UPDATE BOOKS SET Price = Price * 0.95 WHERE Publishers = "EPB"' . This reduces each book's price to 95% of the original, effectively implementing a 5% decrease.

Virtual reality (VR) is used across multiple industries to enhance experiences and improve outcomes. In military training, VR can simulate combat environments, allowing soldiers to practice battlefield strategies . In the entertainment industry, 3D films leverage VR to provide immersive viewing experiences . Designers use VR to create prototypes of cars, enabling visualization and modification of the design before manufacturing . This technology is applied for both practical training and creative exploration, enhancing capabilities and innovation across various fields.

Considering Python code that involves list operations, such as: ```python L1=[2,4,6,8,10] L2=L1 L3=L1.copy() L1[4]=12 L2[3]=14 L1.remove(2) print("List1",L1) print("List2",L2) print("List3",L3) ``` This results in: - List1 and List2 both print '[4, 6, 14, 12]' because L2 is a reference to the same list object as L1, reflecting modifications to L1 . - List3 prints '[2, 4, 6, 8, 10]' since '.copy()' creates a shallow copy, maintaining the original list even after changes to L1 . This highlights the impact of direct vs. shallow copying, where reference changes affect one but not the other.

Floor division in Python, denoted by the '//' operator, divides two numbers and returns the largest integer less than or equal to the division result. Unlike regular division, where the result may be a floating-point number, floor division provides an integer by discarding any fractional part. For example, '9 // 2' yields 4, where '9 / 2' would yield 4.5 . This operator is particularly useful in scenarios where an integral result is necessary, such as indexing.

The 'len()' function in Python is used to determine the number of elements present in a list. For example, given a list 'List1 = [32,45,78,57,-12,29]', calling 'len(List1)' would return 6, indicating that there are six items in the list . The function’s output provides an immediate assessment of the list’s size, which is crucial for operations that depend on list length, such as iterating over elements.

To identify and correct errors in Python code, one must first understand Python's syntax rules and typical errors. Consider the snippet: ```python x=int("enter value of x:") for in range[0,11]: if x=y print x+y else: Print x-y ``` Errors include: - Using `"` in 'int("..."') instead of `input("...")` to prompt user input properly. - Incorrect `for` syntax should be 'for _ in range(0, 11):'. - Conditional expression 'if x=y' should be 'if x == y:' for equality checking. - Indentation and capitalization must be consistent, using 'print(x + y)' instead of 'print x+y'. Corrected code: ```python x=int(input("Enter value of x:")) for _ in range(0, 11): if x == y: print(x + y) else: print(x - y) ``` .

Data redundancy in databases results in duplicated data entries, leading to potential inconsistencies and inflated storage costs. Such redundancy can make data management cumbersome and impact data integrity, where updates require multiple entries to be changed concurrently to maintain accuracy . It is generally addressed by database normalization—a process of organizing data to reduce redundancy, achieved by splitting tables and using relationships more efficiently through keys. Proper database design and the enforcement of integrity constraints further ensure minimal redundancy and enhanced consistency.

A primary key is a unique identifier for a record in a table, ensuring that each value in the column is distinct. A foreign key, on the other hand, is a field (or a set of fields) in one table that uniquely identifies a row of another table, thus establishing a relationship between the two tables. For instance, in a 'Students' table, 'StudentID' might be the primary key. In a 'Enrollments' table, 'StudentID' could serve as a foreign key referring to 'Students.StudentID' . This relational link helps maintain referential integrity in the database.

You might also like