(Pangrams, 15pt) A pangram is a sentence in which every letter of the (English alphabet) occurs at least once (upper or lower case); the most famous example, often taken for typing practice, is The...

(Pangrams, 15pt) A pangram is a sentence in which every letter of the (English alphabet) occurs at least once (upper or lower case); the most famous example, often taken for typing practice, is The quick brown fox jumps over the lazy dog' (for more examples, see the Wikipedia entry on pangrams). Write a function letter check(s) that takes a string s as an input, and counts the number of distinct letters in s; if there are 26 different letters, the function prints the message that you found a pangram, otherwise it tells you how many distinct letters there are in s. See below for test-runs L Python 3.5.2 Shell File Edit Shell Debug Options Window Help >>>letter check ('the quick brown fox jumped over the fence) Your text contains only 20 different letters >>letter check ('the quick brown fox jumped over the lazy dog) Your text contains only 25 different letters >>letter check ( 'the quick brown fox jumps over the lazy dog') You got a pangram >>>letter check 'pack my box with five dozen liquor jugs') You got a pangram Ln: 36 Col: 4 Hint: remember that it doesn't matter whether the letters are lower or upper case. Research the string module to figure out a) a way to turn a string into an all lower-case version, and b) an easy way to get a list of all lower-case letters (there is a predefined constant). Finally, the count method will be useful

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here