Program to count number of lines etc
Program to count number of lines etc
def analyze_file(file_path):
vowels = "aeiouAEIOU"
num_lines = num_words = num_chars = num_vowels = num_numbers = 0
word_counts = {}
# MainCode Line
file_path = "file1.txt" # Replace with your file path
analyze_file(file_path) # Function Call
Output :
Lines: 4
Words: 19
Characters: 93
Vowels: 29
Numbers: 2
Repeated Words:
the: 2 times today: 2 times is: 2 times day: 2 times