Question: Write a python program that modifies the words in a string variable. Create string variable and assign a sentence. Example: aString = Michelle ma belle

 Write a python program that modifies the words in a string

Write a python program that modifies the words in a string variable. Create string variable and assign a sentence. Example: aString = "Michelle ma belle these are words that go together well" {Ref: The Beatles} Your program should generate another string variable and print it. The modifications should be as follows 1 - odd indexed (1st 3rd 5th etc.) words should be converted to upper case 2 - even indexed (2nd 4th 6th etc.) words should be reversed, the output would be as follows bString = "MICHELLE am BELLE eseht ARE sdrow THAT og TOGETHER llew " You can use user - defined functions if you need or you can write your program without any user - defined functions

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!