Page 14 - IPP-12-2025
P. 14
(b)
Accounts
Marketing
Designing
(c) Switch or Hub
(d) WAN will be created as the distance between Mumbai office and Pune regional office is more than
50 km.
(e) Dynamic website is recommended as it supports login features and personalized content for users.
36. Consider the following dataframe df2: [5]
Pat_ID Pat_Name Dept Doc_Name DOA
501 Riya Gupta Orthopaedics Dr. Sahil Bansal 2025-02-19
502 Aman Singh Cardiology Dr. Seema Jain 2025-04-22
503 Kavya Mehra Neurology Dr. Navya Kapoor 2025-01-18
504 Tanmay Jain Orthopaedics Dr. Vyom Gupta 2025-03-11
505 Sejal Roy Neurology Dr. Shama Arora 2025-02-15
Write Python statements for the dataframe df2 to:
(a) Print the last three rows of the dataframe df2.
(b) Display the names of all the patients.
(c) Add a new column Mediclaim and set its value as ‘Yes’ for all the patients.
(d) Retrieve and display Pat_Name and Dept columns for patients whose DOA < '2025-04-01'.
(e) Rename the column name DOA to DateOfAdmission.
Ans. (a) print(df2.tail(3))
(b) print(df2[df2['Pat_Name'])
(c) df2['Mediclaim'] = "Yes"
(d) print(df2[df2['DOA'] < '2025-04-01'][['Pat_Name', 'Dept']])
(e) df2.rename(columns={'DOA': 'DateOfAdmission'}, inplace=True)
37. Write suitable SQL queries for the following: [5]
(a) To display the maximum and minimum charges from Charges column (attribute) in Camp table.
(b) To display the last five characters from Student_Name column (attribute) in Student table.
(c) To display Doctor_Name column (attribute) from Doctors table after converting all characters to
uppercase.
(d) To find the sum of Marks column (attribute) of Semester table.
(e) To count the total number of unique Subject in Teachers table.
Or
(a) Round off the value 198.456 to two decimal places.
(b) Calculate the remainder when 123 is divided by 5.
(c) Display the string ‘PathToLearningAndEnlightenment’ in lowercase.
(d) Display the first six characters from the string ‘Information Protocol’.
(e) Display the data from Employee_Designation column (attribute) in Employees table after removing
the trailing spaces.
Model Test Paper M.11