Question: Python: Look at the code (i.e. Test data ). The input is what the user enters. The output is what I should get (but I'm

Python: Look at the code (i.e. Test data ). The input is what the user enters. The output is what I should get (but I'm having trouble). I have trouble capitalizing one letter words. When user enters string "And to all a good night" , I should get "And to All A Good Night" . I also need 'and', 'the', 'not' to be capitalized only when they're the first letter of given strings. Please follow the 3 strings given and enter exactly as input and output. Please provide the source code. Thanks. Python: Look at the code (i.e. Test data ). The input is

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 Dog

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!