0% found this document useful (0 votes)
8 views34 pages

Python Programs

Uploaded by

logforerror404
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)
8 views34 pages

Python Programs

Uploaded by

logforerror404
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
You are on page 1/ 34

Computer Science (083)

Practical File on Python programs


and MySQL

Submitted by: Submitted to:


Acknowledgement:
In the accomplishment of this practical file successfully, many
people have bestowed upon me their blessings and heart pledged
support.
I’d like to thank my computer science teacher whose valuable
guidance has helped me patch this project. I would like to express
my gratitude to various user forums and various tools for their
invaluable assistance in refining and improving the code.
Contents:
1. Write a program to input 3 numbers and print the greatest
number using nested if.
2. Write a program to print Fibonacci series up-to n terms, also
find sum of series.
3. Write a program to print Pascal’s triangle.
4. Write a program to print the factorial of a list.
5. Write a program for word frequency counters in a paragraph.
6. Write a program to input a number from the user & check if it
is a prime number or not.
7. Program to generate random numbers between 1 and 6,
simulating a dice.
8. Write a program to input a list and arrange the list in
ascending order using bubble sort.
9. Write a function Div3 and Div5 that takes a 10 element
numeric tuple and returns the sum of elements which are
divisible by 3 and 5.
10. Write a program to create the nth term in Fibonacci
series.
11. Write a program to determine whether a number is odd
or even
12. Write a program to read and display, file content line by
line with each word separated by '#'.
13. Write a program to read the content of the file and
display the total number of consonants, uppercase, vowels
and lower case characters.
14. Write a program to read the content of a file line by line
and write it to another file except for the lines containing 'a'
letter in it.
15. Write a program to create a binary file to store Roll no.
and name, Search any Roll no. and display name (if Roll no.
found otherwise Roll no. not found).
16. Write a program to create a binary file to store Roll no,
Name and Marks and update marks of entered Roll no.
17. Write a program to create a CSV file and store
employee no, name, salary and search any employee no
and display name, salary and if not found appropriate
message.
18. Write a menu based program to demonstrate operation
on a stack.
19. Write a program to input a list of numbers and search
for a given number using linear search.
20. Write a program to input a list of integers and search for
a given number using binary search.
21. Write a menu based program to demonstrate
operations on queue.
22. Write a program to connect with databases and store
and display records of employees.
23. Write a program to connect with the database and
search employee number in table employee and display
record, if employee is not found then display message.
24. Write a program to connect with the database and
update the employee record of entered employee no.
25. Write a program to connect with the database and
delete the record of the entered employee number.
Write a program to input 3 numbers and print the
greatest number using nested if

Output
Write a program to print Fibonacci series up-
to n terms, also find sum of series

Output
Write a program to print Pascal triangle

Output
Write a program to print factorial of list

Output
Write a program for word frequency counter
in a paragraph

Output
Write a program to input a number from user and
check if it is a prime number or not

Output
Program to generate random number between 1
and 6, simulating a dice

Output

(Any random number is generated from 1 to 6)


Write a program to input a list and arrange the
list in ascending order using bubble sort

Output
Write a function Div3 and Div5 that takes a 10
elements numeric tuple and return the sum of
elements which are divisible by 3 and 5

Output
Write a program to create nth term in Fibonacci
series

Output
Write a program to determine whether a number
is odd or even

Output
Write a program to read and display, file content
line by line with each word separated by '#'

Text File

Output
Write a program to read the content of file and
display the total number of consonants,
uppercase, vowels and lower case characters

Text File

Output
Write a program to read the content of a file
line by line and write it to another file except
for the lines containing 'a' letter in it

Text file

Output text file

Write a program to create binary file to store


Roll no. and name, Search any Roll no. and
display name (if Roll no. found otherwise
Roll no. not found)

Output
(To enter the student data)

(When no associated roll no. is found)

(To search for a pre entered roll no.)


Write a program to create a binary file to
store Roll no, Name and Marks and update
marks of entered Roll no.

Output
Write a program to create a CSV file and store
employee no, name, salary and search any
employee no and display name, salary and if not
found appropriate message

Output
Write a menu based program to demonstrate
operation on a stack

Output
Write a program to input a list of numbers
and search for a given number using linear
search

Output
Write a program to input a list of integers
and search for a given number using binary
search

Output
Write a menu based program to demonstrate
operations on queue
Output
Write a program to connect with database and
store and display record of employee

Output
Write a program to connect with database and
search employee number in table employee and
display record, if employee no. not found then
display message

Output
Write a program to connect with database and
update the employee record of entered employee
no.

Output
Write a program to connect with database and
delete the record of entered employee number

Output
Thank You

You might also like