Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON- Please look at the following code. Look at the parameter called Test data: input and output. input: 'the quick brown dog' should be output:
PYTHON- Please look at the following code. Look at the parameter called Test data: input and output. input: 'the quick brown dog' should be output: 'The Quick Brown Dog'. Input: 'And to all a good night' should be output: 'And to All A Good Night'. Note that the one letter words should be capitalized. Please correct the source code given and provide block comments showing your thinking. Thanks
13 14 15 1 6 17 18 19 20 21 Test data: input: the quick brown dogNow is the time for al1 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) 23 24 25 2 6 27 28 29 30 31 32 skipList and, 'the,not sen-string.split(' ') sentance-' for word in se if word not in skipList and len (word) >2: sentance-sentance+ ''+word.title () else: ' ' sentance=sentance + +word return sentance. lstrip() s-input ("Type in any string: ") sen=word2 capitalize (s) print (sen)| 35 36 checkerboard checkerboard checkerboard uppercase test test uppercase Type in any string: the quick brown dog the Quick Brown DogStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started