Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python! Thanks 3. (Pangrams, 15pt) A pangram is a sentence in which every letter of the (English alphabet) occurs at least once (upper or

Using Python! Thanks

image text in transcribed

3. (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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Solve the following 1,4 3 2TT 5x- 1+ (15 x) dx 5X

Answered: 1 week ago