Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

another one with the coding stuff... 2. Implement a function digraphs() that takes no parameters. It prompts the user for a string, then counts all

image text in transcribed

another one with the coding stuff...

2. Implement a function digraphs() that takes no parameters. It prompts the user for a string, then counts all of the digraphs appearing in the string, and prints a message with the count for each one. A digraph is a 2 letter combination that represents a single sound. For the purposes of this exercise, just count ch, sh, th, and wh. Make sure that digraphs appearing in both upper and lowercase are counted. The following shows several examples of how the function would be used: >>> digraphs () Enter a sentence to scan: This is my shiny sentence. Who cares? Has O'ch', i 'sh', i 'th', and 1 'wh'. >>> digraphs () Enter a sentence to scan: This then is the end Has o 'ch', o'sh,' 3 'th', and 0 'wh'. >>> digraphs() Enter a sentence to scan: one way is not like two way Has O'ch'o'sh'o'th'o'wh' Note: this exercise does not have a doctest because input() doesn't seem to work very well with doctest. You have to do all test design for this problem, on your own

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

differentiate the function ( x + 1 ) / ( x ^ 3 + x - 6 )

Answered: 1 week ago