0% found this document useful (0 votes)
4 views19 pages

Program List Class XII (Python)

The document is a list of programming tasks primarily focused on Python, covering various topics such as input/output operations, file handling, string manipulation, arithmetic operations, and database interactions with MySQL. Each task includes a brief description and expected output. The tasks range from basic programming exercises to more advanced concepts like exception handling and data structure implementation.

Uploaded by

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

Program List Class XII (Python)

The document is a list of programming tasks primarily focused on Python, covering various topics such as input/output operations, file handling, string manipulation, arithmetic operations, and database interactions with MySQL. Each task includes a brief description and expected output. The tasks range from basic programming exercises to more advanced concepts like exception handling and data structure implementation.

Uploaded by

shakuntlathakre
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

INDEX

S.No PROGRAM LIST


1 Program to print Name, Age, Address and Mob.no using Input
Statement.

2 Program to enter two numbers and print the arithmetic operations


like +, -, *, /, //, and %

3 Write a Program in Python using string function.


(Use at least 10 functions).

4 Program to add two numbers using function.

5 Write a random number generator that generates random numbers


between 1 and 6 (simulates a dice).

6 Read a text file line by line and display each word separated by #.

7 Read a text file and display the number of


vowels/consonants/uppercase/lowercase character in the file.

8 Create a binary file with roll number, name and marks.Input a roll
number and update the marks.

9 Create a binary file in python with name and roll number. Search for
a given roll number and display name, if not found display
appropriate message.

10 Write a program in python to remove all the lines that contain the
character 'a' in a file and write it to another file.

11 Write a program to search the index number of the given element


of array using linear search.

12 Exception Handling Program Using try...except block.


13 Write a Python program to implement a stack using list data
Structure.
14 Take a sample of ten phishing e-mails (or any text file) and find most
commonly occurring word(s).

15 Program for creating Database in MySQL using Python.

16 Create a Table in MySQL with Python

17 Insert Operation with MySQL in Python:


1) Program to print Name, Age, Address and Mob.no using Input
Statement.

OUTPUT:-
2) Program to enter two numbers and print the arithmetic operations
like +, -, *, /, //, and %

OUTPUT:-
3) Write a Program in Python using string function.
(Use at least 10 functions).

OUTPUT:-
4) Program to add two numbers using function.

OUTPUT:-
5) Write a random number generator that generates random numbers
between 1 and 6 (simulates a dice).
Program 1

OUTPUT:-
6) Read a text file line by line and display each word separated by #.

OUTPUT:-

welcome#to#the#world#of#python
7) Read a text file and display the number of
vowels/consonants/uppercase/lowercase character in the file.

OUTPUT:-
8) Create a binary file with roll number, name and marks.Input a roll
number and update the marks.

OUTPUT:-
9) Create a binary file in python with name and roll number. Search
for a given roll number and display name, if not found display
appropriate message.

OUTPUT:-
10) Write a program in python to remove all the lines that contain the
character 'a' in a file and write it to another file.

OUTPUT:-
11) Write a program to search the index number of the given element
of array using linear search.

OUTPUT:-
12) Exception Handling Program Using try...except block.

OUTPUT:-
13) Write a Python program to implement a stack using list data
Structure.

OUTPUT:-
14) Take a sample of ten phishing e-mails (or any text file) and find
most commonly occurring word(s).

Word File (wordfile.txt)

OUTPUT:-
15) Program for creating Database in MySQL using Python.

OUTPUT:-
16) Create a Table in MySQL with Python.

OUTPUT:-
17) Insert Operation with MySQL in Python.

OUTPUT:-

You might also like