Practical File Questions Updated
Practical File Questions Updated
(12 IP)
2. Create a Series object ‘Apple’ to store all vowels individually. Its index should
be 1,2,3,4 and 5.
3. WAP to create a Series object using ndarray that has 5 elements in the range
50 and 100.
9. WAP to create dataframe from nested lists by passing column names and
index values
Data1 = [[‘Ravi’,25], [‘Tanush’,28], [‘Ravindra’,30], [‘Dharmendra’,29]]
Idx = [‘emp1’, ‘emp2’, ‘emp3’, ‘emp4’]
12. WAP to create a Series object using a dictionary that stores the number of
students in each section of class 12th.
13. You are working with a DataFrame that contains information about a group of
students. The DataFrame includes the following columns:
● Name
● Age
● Grade
Write a Python program using Pandas to find the datatype of each column in
the DataFrame.
Name Age Grade
0 Alice 20 85
1 Bob 22 90
2 Charlie 21 88
3 David 23 92
4 Eve 20 95
14. Write a program to create a series using list of marks of 10 student’s and
display first 5 student’s marks and last 2 students marks from series
object.(using head() and tail()).
15. Write a program that reads students marks from a ‘Result.csv’ file and
displays the percentage of each student.
16. Write a program to store the details of Employees such as Empno, Name,
Salary into a Employee.csv file. Also, write a code to read employee details
from csv file.
17. Write a Python program to plot a Line chart to depict the changing weekly
Rice and Wheat prices for four weeks. Also, give appropriate axes labels,
title, and keep the marker style as Square and marker edge color as ‘green’
for Rice.
Wheat = [45,25,32,,80]
Rice = [16,18,45,50]
18. Write a python program to display a horizontal bar chart of the number of
students in a class.
Sample Data:
Class: I, II, III, IV, V, VI, VII, VIII, IX, X
Strengths: 40,43,50,46,36,42,40,61,50,48
19. Plot a histogram of a class text of 40 students based on random sets of marks
obtained by the students (MM = 100)
20. Write a program to plot a multiple bar chart From CSV file using matplotlib for
subject wise score of Class A, Class B and Class C. Different colors represent
each class, and subjects include English,Accountancy,Economics,BST and IP.
Proper labels, a title and a legend are displayed on the chart.
21. —----
22. —----
27. Write a query to list all the tables that exist in the current database.
28. Write a query to insert all the rows of the following table inside the Student
table.
29. Write a query to display all the details of the student from the Student table.
30. Write a query to list all the products in descending order by their product
name from the following Product table.
Product
id ProductName Category Price StockQuantity
31. Write a query to find total stock quantity from Product Table.
33. Write a query to count the number of products which have a price more than
5000 in the Product table.
Q34 - 38 - To write Queries for the following Questions based on the given
table -"STUDENT":
34. Write a Query to Display the square of age for students who got admission in
the month of May.
35. Write a Query to display Student names and their Percentage in round figure.
36. Write a Query to display Department name in lower case letters.
37. Write a Query to display department name and its respective number of
characters in Dept column.
38. Write a Query to display student name and month of date of admission of all
Students.
Q39 - 42 Write the SQL query for questions
Consider the following relations MobileMaster and MobileStock:
Table: MOBILEMASTER
M_Id M_Company M_Name M_Price M_Mf_Date
39. Display the mobile company, mobile name and price in descending order of
their manufacturing date.
40. List the details of mobiles whose name starts with "S".
41. Display the mobile supplier and quantity of all mobiles except "MB003".
42. To display the names of mobile companies having price between 3000 and
5000.