0% found this document useful (0 votes)
3 views8 pages

Python File Programs

The document outlines several programming tasks involving file operations in Python. It includes merging contents from two files into a third file, checking for specific words in a file, finding the most frequently occurring word, and analyzing text for various characteristics. Each task is described with an aim, program, output, and a note on successful execution.

Uploaded by

darthlanka
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)
3 views8 pages

Python File Programs

The document outlines several programming tasks involving file operations in Python. It includes merging contents from two files into a third file, checking for specific words in a file, finding the most frequently occurring word, and analyzing text for various characteristics. Each task is described with an aim, program, output, and a note on successful execution.

Uploaded by

darthlanka
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/ 8

Aim :

Write a Python code to merge two given file contents into a third file.

Description:

Create two files EEE_PY_B1.txt and EEE_PY_B2.txt

Create a third file EEE_PY_B1.txt and write the data of both files into it.

Filename Data
EEE_PY_B1.txt Every Thursday 10 to 12
EEE_PY_B2.txt Every Tuesday 2 to 4
EEE_PY_Lab.txt Every Thursday 10 to 12
Every Tuesday 2 to 4

Program:
Output:

Result:

The above program is executed successfully and output is obtained correctly for all
valid inputs.
Aim:
Write a Python code to open a given file and construct a function to check for given words present
in it and display on found.

Program:

Output:

allbads.txt file
Result:

The above program is executed successfully and output is obtained correctly for all
valid inputs.
Aim:
Write a Python code to Read text from a text file, find the word with most number of
occurrences

Program:

Output:

Result:

The above program is executed successfully and output is obtained correctly for all
valid inputs.
Aim

Write a function that reads a file file1 and displays the number of words, number of vowels, blank
spaces, lower case letters and uppercase letters.

Program

Output

Result:
The above program is executed successfully and output is obtained correctly for all
valid inputs.

You might also like