0% found this document useful (0 votes)
7 views2 pages

Practical Questions

The document contains instructions for two questions. The first question requires writing a Python program to manipulate a list of student names, including operations like adding, removing, and sorting names. The second question involves creating a MySQL table for employee records and writing SQL queries to retrieve and manipulate data from that table.

Uploaded by

aditsharma0729
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Practical Questions

The document contains instructions for two questions. The first question requires writing a Python program to manipulate a list of student names, including operations like adding, removing, and sorting names. The second question involves creating a MySQL table for employee records and writing SQL queries to retrieve and manipulate data from that table.

Uploaded by

aditsharma0729
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

General Instructions:

1. Answer both questions.

2. Use Python for Question 1 and MySQL for Question 2.

3. Write correct syntax and ensure proper output.

4. Marks are awarded for logic, syntax, output, and execution.

Q1. Python Programming – Lists

Write a Python program using Lists to perform the following operations:

a) Create a list named STUDENTS containing:


["Aarav", "Diya", "Kunal", "Meera", "Sanya"]

b) Display the original list.


c) Add a new student name "Rohan" at the end of the list.
d) Remove the name "Kunal" from the list.
e) Display the total number of students.
f) Display the list in alphabetical order.
g) Display the first three elements of the list.

Q2. MySQL – Table Creation and Queries


A) Create a table named EMPLOYEE with the following structure:

Field Name Data Type

Emp_ID INT

Emp_Name VARCHAR(30)

Department VARCHAR(20)

Salary INT

DOJ DATE

B) Write SQL queries for ANY FIVE of the following:

1. Display all records from the EMPLOYEE table.


2. Display names and salaries of employees earning more than 40,000.

3. Display details of employees from IT department.

4. Update salary of employee with Emp_ID = 105 by increasing it by 5,000.

5. Delete records of employees earning less than 25,000.

6. Display employee names in descending order.

7. Display details of employees who joined after 2020-01-01.

You might also like