0% found this document useful (0 votes)
13 views17 pages

Final Ip File Work

ignore

Uploaded by

narasanji1
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)
13 views17 pages

Final Ip File Work

ignore

Uploaded by

narasanji1
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/ 17

1

1.
INDEX
Write a code to create a Series object using the Python sequence 3
[4,6,8,10]
2. Write a code to create a Series object using the Python sequence 3
(11,21,31,41)
3. Write a program to create a Series object using individual characters 3
'o','h','o'.
4. Write a program to create a Series object using a string: 'So funny'. 3
5. Write a program to create a Series object using three different words: 3
'I','am','laughing'.
6. Write a program to create a Series object using an ndarray that has 5 3
elements in the range 24 to 64.
7. Write a program to create a Series object using an ndarray that is 4
created by tiling a list [3,5], twice).
8. Write a program to create a Series object using a dictionary that stores 4
the number of students in each section of class 12 in your school.
9. Write a program to create a Series object that stores the initial budget 4
allocated (50000/- each) for the four quarters of the year: Qtr1,Qtr2,
Qtr3, Qtr4.
10. Total number of medals to be won is 200 in the Inter University 4
games held every alternate year. Write code to create a Series object
that stores these medals for games to be held in the decade 2020-
2029.
11. A Python list namely 'section' stores the section names ('A','B','C',D') 4
of class 12 in your school. Another list 'contri' stores the contribution
made by these students to a charity fund endorsed by the school.
Write code to create a Series object that stores the contribution
amount as the values and the section names as the indexes.
12. Sequences 'section' and 'contri' store the section names 5
('A','B','C','D','E') and contribution made by them respectively
(6700,5600,5000,5200, nil) for a charity. Your school has decided to
donate as much contribution made by each section, i.e, the donation
will be doubled.
13. Consider the two series object 's11' and 's12' that you created in 5
examples 11 and 12 respectively. Print the attributes of both these
objects in a report form as shown below:
14. Given a table Library: 6
(i) SELECT UPPER(Title) FROM Library WHERE Price<150;
(ii) SELECT CONCAT (Author, Type) FROM Library where
Qty<3;
(iii)SELECT MOD(Qty,4) FROM Library;
15. Write SQL queries which will perform the following operations: 7
(i) To display the year from your Date of Admission which is
‘2023-05-15’
(ii) To convert your email id ‘[email protected]’ to lowercase.
(iii) To remove leading spaces from a string ‘my country’
2

(iv) To display current data.


(v) To display the value of 106.
16. Write suitable queries based on table ‘STUDENT’: 8
(i) Display gender wise highest marks.
(ii) Display city wise lowest marks.
(iii) Display total number of male and female students.
17. Write the output of the SQL queries (i) to (iii) based on the given 9
relations Teacher and Posting.
18. Consider Table CABHUB and give outputs of the following SQL 10
queries.
19. Consider the Table STORE and give output of the following SQL 11
queries
20. Using CARSHOWROOM database given write SQL queries for the 12
following
(a) Add a new column Discount in the INVENTORY table.
(b) Set appropriate discount values for all cars keeping in mind
the following-
(i) No discount is available on the LXI model
(ii) VXI model gives a 10% discount
(iii) A 12% discount is given on cars other than LXI model
and VXI model.
(c) Display the name of the costliest car with furl type ‘Petrol’.
(d) Calculate the average discount and total discount available on
Car4.
(e) List the total number of cars having no discount.

21. In a Database, there are two tables given below: 13,14


(i) To display employee ids, names of employees, job ids
with corresponding job titles.
(ii) To display names of employees, sales and corresponding
job titles who have achieved sales more than 1300000.
(iii) To display names and corresponding job titles of those
employees who have ‘SINGH’(anywhere) in their names.
(iv) Identify foreign key in the table EMPLOYEE.
(v) Write SQL command to change the JOBID to 104 of the
EMPLOYEE with ID as E4 in the table ‘EMPLOYEE’.
22. Give output for following SQL queries as per given table(s) : 14,15
23. Give output for following SQL queries as per given table(s) : 16,17
3

Practical 1

Practical 2

Practical 3

Practical 4

Practical 5

Practical 6
4

Practical 7

Practical 8

Practical 9

Practical 10

Practical 11
5

Practical 12

Practical 13
6

Practical 14

(i)

(ii)

(iii)
7

Practical 15

(i)

(ii)

(iii)

(iv) (v)
8

Practical 16

(I)

(II)

(III)
9

Practical 17

(i)

(ii)

(iii)
10

Practical 18

(i)

(ii)

(Invalid query)

(iii)

(iv)
11

Practical 19

(i)

(ii)

(iii)

(iv)
12

Practical 20

(a)

(b)

(c)

(d)

(e)
13

Practical 21

(i)

(ii)
14

(iii)

(iv) JOBID is the Foreignh Key in the table EMPLOYEE.

(v)

Practical 22
15

(i)

(ii)

(iii)

(iv)
16

Practical 23

(i)

(ii)
17

(iii)

(iv)

You might also like