Class 12 Python & SQL Practical File
Python Program 1
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
print('Hello')
Sample Output: Program executed successfully.
Python Program 2
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 3
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 4
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 5
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 6
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 7
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 8
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 9
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 10
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 11
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 12
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 13
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 14
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 15
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 16
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 17
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 18
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 19
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
Python Program 20
Aim: Demonstrate the concept.
Algorithm: 1. Start 2. Take input (if required) 3. Process 4. Display output 5. Stop.
# Sample Python code
# Replace with full implementation in class
Sample Output: Program executed successfully.
SQL Question 1
Query:
CREATE TABLE Student(RollNo INT, Name VARCHAR(30), Marks INT);
Explanation: This query performs the required database operation.
SQL Question 2
Query:
INSERT INTO Student VALUES (1,'Aman',90);
Explanation: This query performs the required database operation.
SQL Question 3
Query:
SELECT * FROM Student;
Explanation: This query performs the required database operation.
SQL Question 4
Query:
SELECT * FROM Student WHERE Marks>80;
Explanation: This query performs the required database operation.
SQL Question 5
Query:
UPDATE Student SET Marks=95 WHERE RollNo=1;
Explanation: This query performs the required database operation.
SQL Question 6
Query:
DELETE FROM Student WHERE RollNo=1;
Explanation: This query performs the required database operation.
SQL Question 7
Query:
SELECT * FROM Student ORDER BY Marks DESC;
Explanation: This query performs the required database operation.
SQL Question 8
Query:
SELECT COUNT(*) FROM Student;
Explanation: This query performs the required database operation.
SQL Question 9
Query:
SELECT AVG(Marks) FROM Student;
Explanation: This query performs the required database operation.
SQL Question 10
Query:
SELECT * FROM Student WHERE Name LIKE 'A%';
Explanation: This query performs the required database operation.