International Indian School, Riyadh WORKSHEET (2020-2021) Grade - Xii - Informatics Practices - Second Term
International Indian School, Riyadh WORKSHEET (2020-2021) Grade - Xii - Informatics Practices - Second Term
International Indian School, Riyadh WORKSHEET (2020-2021) Grade - Xii - Informatics Practices - Second Term
WORKSHEET (2020-2021)
Page 1 of 9
15 What will be returned by the following statement. print(s>7)
16 Consider a=pd.Series(np.arange(1,20,4)).
a) What will be displayed by print(a[:4])
b) What will be displayed by print(a[::-2])?
c) What will be displayed by print(a[1:6:3])?
d) What will be displayed by print(a+7)?
print(a>10)?
17 All pandas data structures are ________ mutable but not always ____________ mutable.
18 What will be returned by the following python code.
19 Write the python code to create the following series data structure.
20 Consider the code given below, what will be the indexes of the result
Page 2 of 9
22 What will be printed by the following python code:
.
31 Consider a data frame 'studentdf' contains information about student having columns
rollno, name,class and section. Write the statement to add one more column as fee
32 Consider a data frame 'studentdf' contains information about student having columns
rollno, name,class and section. Write the statement to delete column fee of data frame.
33 What will be the output produced by the following code:
Page 3 of 9
34 What will be the output of the following code:
35 Write a python code to create a data frame with appropriate headings from the list given
below: [‘A101’,
‘Anil’,8000],[‘A102’,’Manish’,4000],[‘A103,’Naren’,7500],[‘A104’, ‘Dima’,5000]
Given a data frame df1 as shown below: Answer the following questions:
(i) Write a command to list the brand and price of all rows.
(ii) Write a command to list the year of rows 1 and 2
(iii) Write a command to change the names of rows into zero,one,two,three.
(iv) Write a command to delete the column Price
(v) Write the command to list the rows 0,2 and 3
36 What will be the output of the following statement. Consider a dataframe df1 given.
print(df1.iat[3,2])
37 Write the command to get the output as shown in the image below from the given input:
Page 4 of 9
38 Write a python code to create a data frame with appropriate headings/ column names from
the list given below:
[‘S101’, ‘Amy’, 70], [‘S102’, ‘Bindhu’,90],[‘S104’,’Cathy’,85],[‘S105’, ‘Gundaho’,82]
Write a python code to create a data frame df1 with heading a, b from the list given below:
[[1,2],[3,4],[5,6],[7,8]]
Given a data frame df1 as shown below:
City MaxTemp MinTemp RainFall
Delhi 40 32 24.1
Bengaluru 31 25 36.2
Chennai 35 27 40.8
Mumbai 29 21 35.2
Kolkata 39 23 41.8
Page 5 of 9
40
41
42
Page 6 of 9
ITEM_NO COST
101 5000
102 NULL
103 4000
104 6000
105 NULL
Based on this information . find the output of the following queries:
i. SELECT COST FROM ITEMS;
ii. SELECT COST+100 FROM ITEMS WHERE ITEM_NO>103;
8. Explain the purpose of DDL and DML commands used in SQL. Also give two examples
of each.
9. Differentiate alter table drop command and drop table command with example.
10. Consider the table TEACHER given below. Write commands in SQL FOR (1) to (4) and
output for (5) to (8)
TEACHER
PREPARED BY:
Page 9 of 9