Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( Counting Duplicate Words - 1 0 points ) Write a script that uses a dictionary to determine and print the number of duplicate words

(Counting Duplicate Words-10 points) Write a script that uses a dictionary to determine and print the number of duplicate words in a sentence. Treat uppercase and lowercase letters the same and assume there is no punctuation in the sentence. Use the techniques you learned in Section 6.2.7. Words with counts larger than 1 have duplicates
(Character Counts -10 points) Recall that strings are sequences of characters. Use techniques similar to Fig. 6.2 to write a script that inputs a sentence from the user, then uses a dictionary to summarize the number of occurrences of each letter. Ignore case, ignore blanks and assume the user does not enter any punctuation. Display a two-column table of the letters and their counts with the letters in sorted order.
Bonus -2points: Use a set operation to determine which letters of the alphabet were not in the original string .
Deliverables:
Your source code file (.ipynb or .py)
A screenshot of your source code along with the output result
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

Students also viewed these Databases questions