Question: 1. Without importing libraries, write a python function that counts how many words there are in a text, excluding numbers and special characters. For example,
1. Without importing libraries, write a python function that counts how many words there are in a text, excluding numbers and special characters. For example, if the text is "Hello everyone, I hope you are enjoying your day everyone! %^& 4"
the output should be :
Your text has: 10 words
2. without importing libraries, write a python function that counts how many times each word was repeated in the text.
The output should be:
Hello: repeated 1 times
everyone: repeated 2 times
i: repeated 1 times
hope: repeated 1 times
you: repeated 1 times
are: repeated 1 times
enjoying: repeated 1 times
your: repeated 1 times
day: repeated 1 times
3. without importing libraries, write a python function that gives the top letter in terms of occurences and how many occurences there are, excluding numbers and special characters. If there is a tie, the function should give you both of the letters
The output should be
The letter that is repeated the most is the letter: e, repeated 10 times
if there was a tie, it should be
The letter that is repeated the most is the letter: e,i repeated 10 times
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
