Question: Create a Python program that asks the user to input a string and then prints out that string in Title function (string.title()). That is, the

 Create a Python program that asks the user to input a

Create a Python program that asks the user to input a string and then prints out that string in Title function (string.title()). That is, the first letter of each word is uppercase and the remainder of the word is lowercase. If the entire word is two letters long, the entire word is lower case. The three letter words and, the, and not are all lowercase while all other three letter words are capitalized. The first word in the string is capitalized, no matter how long it is. So if the user enters the string the following string: the dog and the mouse fought over the piece of bread, and it was not a pleasant sight. Output : The Dog and the Mouse Fought Over the Piece of Bread, and it Was not a Pleasant Sight. Note* If sentence starts with and, the , or not it the word should still be capitalized.

2 define sentence() 4 """ exceptions"" 5 sentence = (input ("Enter a sentence: "))

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!