Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Help With Code: The sentence And to all a good night should read And to All A Good Night. All the information is listed

Python Help With Code: The sentence "And to all a good night" should read "And to All A Good Night".

All the information is listed in the image provide.

Please provide source code and screenshot /img of output. Thanks. Whoever helps me gets a thumbs up and a lot of appreciation.

image text in transcribed

image text in transcribed

def capitalizeStr ): "" "To take user input and print out that string in the Title Case. 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 Test data: input: 'the quick brown dogNow is the time for all good men And to all a good night' output: 'The Quick Brown Dog"Now is the Time For All Good Men And to All A Good Night' Params: s (string) Returns: (3 strings) TnII string = input ('Enter a string : ' . join (s [0] . upper ( ) + s [ 1 : ] for s in string . Split ( ' ' ) ) tempString = ' result = "" for word in tempString.split): if i == 0: elif (len (word)

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions