Question: NO BREAK COMMAND AND USE WHILE LOOPS. You will create a program to count how many words in a sentence look like they are in

NO BREAK COMMAND AND USE WHILE LOOPS.

You will create a program to count how many words in a sentence look like they are in past tense, i.e. end in -ed.

The program must contain a main() and a function calledcountPastTense(), implemented as described in the function header comment given below. (You should include this function header comment in your own code.)

############################################################# # countPastTense() counts past tense words # Parameters: phrase; a string to count past tense words # Return: none 

Here is some sample output, with the user input in blue. (Yours does not have to match this word for word, but it should be similar.)

linux[0]$ python hw5_part2.py Tell me something: This show has jumped the baby sharkThere appear to be 1 past tense words in that.

linux[0]$ python hw5_part2.py Tell me something: All those red hermit crabs attacked me when I fed them There appear to be 3 past tense words in that.

linux[0]$ python hw5_part2.py Tell me something: Periods make the word be ignored. There appear to be 0 past tense words in that.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!