0% found this document useful (0 votes)
36 views3 pages

XIIInfo Pract pt1410

Practice papers

Uploaded by

06chet
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)
36 views3 pages

XIIInfo Pract pt1410

Practice papers

Uploaded by

06chet
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
You are on page 1/ 3

SAMPLE PAPER

_______________________________________________________________________________________________
General Instruction:
(a) Make sure to follow a sequence while writing.
(b) Paper is divided into 2 sections i.e., Section A & B
(c) Section A Contains Conceptual Type Questions of 5 marks
(d) Section B contains Competency Type Questions of 20 marks

_SECTION A (OBJECTIVE TYPE QUESTIONS)-5 MARKS

Q1. To create an empty Series object, you can use: 1

(a) pd.Series(empty) (b) pd.Series() (c) pd.Series(np.NaN) (d) all of these

Q2. Which type of values will be returned by SQL while executing the following 1
statement?

Select length(“LENGTH”) ;

(A) Numeric value (B) Text value (C) Null value (D) Float value

Q3. The correct SQL from below to find the temperature in increasing order of all cities. 1

(A) SELECT city FROM weather order by temperature ;

(B) SELECT city, temperature FROM weather ;

(C) SELECT city, temperature FROM weather ORDER BY temperature ;

(D) SELECT city, temperature FROM weather ORDER BY city ;

Questions 4 and 5 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

Q4. Assertion(A): The UNIQUE and PRIMARY KEY constraints are similar but not the same. 1

Reasoning(R): There can be only one column with PRIMARY KEY constraint in a tale.

Q5. Assertion(A): A series object stores value of homogeneous types. 1

Reasoning(R): Even if value appear to be different types, internally they are stored
in a common data type.

SECTION B (SHORT ANSWER TYPE QUESTIONS)- 20 MARKS

Q6. Neelam, a database administrator needs to display Class wise total number of students 2
of ‘XI’ and ‘XII’ house. She is encountering an error while executing the following query:

Page 1/XIIC./IP/ 9 COPIES


SELECT CLASS, COUNT (*) FROM STUDENT ORDER BY CLASS HAVING CLASS=’XI’ OR
CLASS= ‘XII’;

Help her in identifying the reason of the error and write the correct query by suggesting
the possible correction (s).

Q7. Write a program to create a series object using a dictionary that stores the number of 2
Kendriya Vidyalayas in each city of cities of your state.

Note: Assume some cities like AGRA, JHANSI, MATHURA, NOIDA having 4, 3, 5, 4 KVs
respectively and pandas library has been imported as mypandas.

Q8. What will be the output of the following code: 2

>>> import pandas as pd

>>> mydata=pd.Series( [‘rajesh’, ‘amit’, ‘tarun’, ‘Radhika’] )

>>> print(mydata < ‘rajesh’ )

Q9. Write suitable SQL query for the following: 2

i) Display 4 characters extracted from 3rd character onwards from string ‘IMPOSSIBLE’.

ii) Display the position of occurrence of string ‘GO’ in the string “LET’s GO to GOA”.

iii) Round off the value 257.75 to nearest ten rupees.

iv) Display the remainder of 18 divided by 5.

Q10. Write Python code to create a Series object Temp1 that stores temperature of 2

seven days in it. Take any random seven tempratures

Q11. Three Series objects store the marks of 5 students in three terms. Roll number of 2
students form the index of these Series objects. The Three Series objects have the
same indexes.

Calculate the total weighted marks obtained by students as per the following formula:

Final marks=25% Term 1+ 25% Term2+50% Term 3

Q12. Consider the following table SCHOOLBUS given below. Write SQL queries for i to iii. 2
Rtno Area_Covered Noofstudents Transporter Charges
1 Vasant Kunj 120 Shivam Travels 100000
2 Hauz Khas 80 Anand Travels 85000
3 Pitampura 55 Anand Travels 60000
4 Rohini 90 Anand Travels 100000
5 Yamuna Vihar 60 Bhalla Co. 55000
6 Krishna Nagar 80 Yadav Co. 80000
7 Vasundhra 110 Bhalla Co. 100000

i. Display the Transporter wise Highest Charges.

ii. Display Noofstudents transported by each transporter.

Page 2/XIIC./IP/ 9 COPIES


OR

Display total Charges collected by each transporter

Q13. Consider the following table GAMES. Write output for the following SQL command. 2

SELECT Gcode,Gamename FROM GAMES WHERE Type='Indoor' ORDER BY prizemoney


DESC;

Q14. Write outputs for SQL queries (i) to (iii) which are based on the given table PRODUCT: 2

PID PNAME QTY PRICE DATE_PURCHASE

P101 Moisturizer 10 125 2021-10-21

P102 Facewash 20 95 2022-09-10

P103 Shampoo 15 550 2021-07-09

P104 Electronic accessories 25 1050 2018-03-15

P105 Stationaries 30 250 2017-05-20

i. SELECT LENGTH(PNAME) FROM PRODUCT WHERE PRICE>500;


ii. SELECT MAX(DATE_PURCHASE) FROM PRODUCT;
OR
SELECT MOD(PRICE,QTY) FROM PRODUCT WHERE QTY>20;

Q15. Write statement to create a series PROD with each element as a product of its index 2
and 3 as given:

00

13

26

39

4 12

Page 3/XIIC./IP/ 9 COPIES

You might also like