Pragyan Singh CS Practical File 2024-25
Pragyan Singh CS Practical File 2024-25
SQL Queries
14 SQ L C O M M A N D S EXERCISE – 1 35
15. SQ L C O M M A N D S EXERCISE – 2 37
16. SQ L C O M M A N D S EXERCISE – 3 Class XII-A: 39
CS Practical file
17. SQ L C O M M A N D S EXERCISE – 4 41
18. SQ L C O M M A N D S EXERCISE – 5 43
DATE:
CREATING A M E N U DRIVEN PROGRAM T O PERFORM ARITHMETIC
OPERATIONS
AIM:
S O U RC E CODE:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
SAMPLE OUTPUT:
***************************************************************************************
AIM:
To write a menu driven Python Program to find Factorial and sum of list of numbers
using function.
S O U RC E CODE:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
Class XII-A: CS Practical file
Page 6
SAMPLE OUTPUT:
Python Executed Program Output:
************************************************************************************************
AIM:
S O U RC E CODE:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
SAMPLE OUTPUT:
***************************************************************************
AIM:
To write a Python Program to Read a text file "Story.txt" line by line and display
each word separated by '#'.
S O U RC E CODE:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
SAMPLE OUTPUT:
Story.txt:
AIM:
To Write a method Disp() in Python, to read the lines from poem.txt and display those
Source Code:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
Sample Output:
Poem.txt:
**********************************************************************************
AIM:
To write a Python Program to Create a binary file with roll number and name.
Search for a given roll number and display the name, if not found display appropriate
message.
S O U RC E CODE:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
*******************************************************************************************
AIM:
To write a Python program Create a CSV file to store Empno, Name, Salary and search any Empno
and display Name, Salary and if not found display appropriate message.
S O U RC E CODE:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
SAMPLE OUTPUT:
******************************************************************************
AIM:
To Write a program, with separate user-defined functions to perform the following
operations:
(i) To Create a function Push(Stk,D) Where Stack is an empty list and D is Dictionary of Items.
from this Dictionary Push the keys (name of the student) into a stack, where
the corresponding value (marks) is greater than 70.
(ii) To Create a Function Pop(Stk) , where Stk is a Stack implemented by a list of student
names. The function returns the items deleted from the stack.
(iii) To display the elements of the stack (after performing PUSH or POP).
Source Code:
Thus, the above Python program has been executed and the output is verified
successfully.
Sample Output:
*********************************************************************************
AIM:
To write a Python Program to integrate MYSQL with Python by inserting records to
Emp table and display the records.
S O U RCE CODE:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
******************************************************************************************************************************************************************************
AIM:
To write a Python Program to integrate MYSQL with Python to search an Employee using
EMPID and display the record if present in already existing table EMP, if not display the
appropriate message.
S O U RC E CODE:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
SAMPLE OUTPUT:
AIM:
To write a Python Program to integrate MYSQL with Python to search an Employee using
EMPID and update the Salary of an employee if present in already existing table
EMP, if not display the appropriate message.
S O U RC E CODE:
Result:
Thus, the above Python program has been executed and the output is verified
successfully.
**************************************************************************************************************************************************