Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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 Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

What is investment? How is it related to national saving?

Answered: 1 week ago