Question: Hello, I need help coding this problem using Python 3 (I also cannot use break), Create a program that checks the grammar of a sentence:

Hello, I need help coding this problem using Python 3 (I also cannot use break),

Create a program that checks the grammar of a sentence: it must start with a capital letter, and it must end with ?, !, or . (a question mark, exclamation mark, or period). The program must use two functions for this: checkCapital() and checkPunctuation(), both of which take in the complete sentence as their only formal parameter. Each function must print out whether the sentence passes or fails their requirement. Within main(), the user can continue entering sentences to check until they want to quit, which they do by entering an empty string (hitting Enter without typing anything).

This is what the output should look like,

Enter a sentence (enter nothing to quit): dogs are good

WRONG - Sentences start with a capital letter.

WRONG - Sentences use punctuation.

Enter a sentence (enter nothing to quit): dogs are good.

WRONG - Sentences start with a capital letter.

Correct punctuation!

Enter a sentence (enter nothing to quit): Dogs are good

Correct capitalization! WRONG - Sentences use punctuation.

Enter a sentence (enter nothing to quit): Dogs are good!

Correct capitalization!

Correct punctuation!

Enter a sentence (enter nothing to quit): Dogs are good?

Correct capitalization!

Correct punctuation!

Enter a sentence (enter nothing to quit): I!

Correct capitalization!

Correct punctuation!

Enter a sentence (enter nothing to quit):

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!