Computer Science, asked by Anonymous, 5 days ago

Write a python program that accepts filename as an input from the user. Open the file and
count the number of times a character appears in the input.​

Answers

Answered by Disha094
3

This is a Python Program to count the occurrences of a letter in a text file.

Problem Description

The program takes a letter from the user and counts the number of occurrence

. Read each line from the file and split the line to form a list of words.

3. Use a for loop to traverse through the words in the list and another for loop to traverse through the letters in the word.

4. Check if the letter provided by the user and the letter encountered over iteration is equal and if they are, increment the letter count.

5. Exit.

Answered by mittalsapna19
4

Answer:

refer to attachment

hope it helps

✌✌

Attachments:
Similar questions