You are on page 1of 2

CLASS – XI

[Session 2023-24]
SUBJECT – INFORMATICS PRACTICES
HOLIDAY HOMEWORK (WINTER BREAK)
26/12/2023
1. Differentiate between the following commands:

a) ALTER and UPDATE

b) DELETE and DROP

27/12/2023
1. What will be the output of the following code segment:

a. myList = [1,2,3,4,5,6,7,8,9,10]

del myList[3:]

print(myList)

b. myList = [1,2,3,4,5,6,7,8,9,10]

del myList[:5] print(myList)

c. myList = [1,2,3,4,5,6,7,8,9,10]

del myList[::2] print(myList)

28/12/2023
1.Consider a list: list1 = [6,7,8,9] What is the difference between the following operations on list1:

a. list1 * 2

b. list1 *= 2

c. list1 = list1 * 2

2. Differentiate between append() and extend() functions of list.

29/12/2023
1. The record of a student (Name, Roll No., Marks in five subjects and percentage of marks) is stored
in the following list:

stRecord = ['Raman','A-36',[56,98,99,72,69], 78.8]

Write Python statements to retrieve the following information from the list stRecord.

a) Percentage of the student

b) Marks in the fifth subject

c) Maximum marks of the student

d) Roll no. of the student

e) Change the name of the student from ‘Raman’ to ‘Raghav’


30/12/2023
1. Consider the following list myList. What will be the elements of myList after the following two
operations:

myList = [10,20,30,40]

i.myList.append([50,60])

ii. myList.extend([80,90])

31/12/2023
1.Write MySQL command to create the Table ‘PRODUCT’ with given constraints.

Table : LIBRARY

COLUMN_NAME DATATYPE (SIZE)


ProductId Int(5)
PName Varchar(40)
Type Char(4)
Qty Int(4)
Price Int(6)

02/01/2024
1. What is DBMS? Name any two open source DBMS software.

2.What is SQL ? What are different categories of commands available in SQL?

03/01/2024
1.Consider the following table named ‘‘SOFTDRINK’’. Write commands of SQL for (i) to (iii) and
output for (iv) to (v).

Table : SOFTDRINK
DRINKCODE DNAME PRICE CALORIES
101 Lime and Lemon 20.00 120
102 Apple Drink 18.00 120
103 Nature Nectar 15.00 115
104 Green Mango 15.00 140
105 Aam Panna 20.00 135
106 Mango Juice Bahaar 12.00 150
i) To display names and drink codes of those drinks that have more than 120 calories.

ii) To display drink codes, names and calories of all drinks, in descending order of calories.

iii) To display names and price of drinks that have price in the range 12 to 18 (both 12 and 18
included).

iv) SELECT DNAME FROM SOFTDRINK WHERE DNAME LIKE “%Mango%”;

v) SELECT DRINKCODE,DNAME,CALORIES – 10 AS ‘REDUCED CALORIES’ FROM SOFTDRINK;

You might also like