Posting together because they are related.
Python
1. Create a program to count the number of occurrences of eachletter of the alphabet in a text file, and print out the total foreach letter (if greater than 0). Ignore numbers, punctuation, andspecial characters. Make sure to treat capital and lowercaseletters as occurrences of the same letter. The text file(sample_text.txt) is attached to the assignment.
Example: For the text \"My dog's name is Winston.\" The resultswould be:
A - 1
D - 1
E - 1
G - 1
I - 2
M - 2
N - 3
O - 2
S - 3
T - 1
W - 1
Y - 1
2. Rewrite # 1 above using a dictionary to hold each alphabeticcharacter as a key, and the count of the characters as the value.Reuse as much of the code from #1 as you can! However, usedifferent variable names to prevent errors caused by using the samenames. (5 pts.)