Question: Write a function mangle that takes a string as a parameter and returns the string after performing the following operations: i . Converting the string

Write a function mangle that takes a string as a parameter and returns the string after performing the following operations:
i. Converting the string to all upper case letters ii. Removing the third character
iii. Removing the third to last character Test that your function works.
Hint: Think about how you can remove from a string by creating a new string, adding characters to it, and omitting the characters you dont want?
Example function calls:
print(mangle(hellothere))
print(mangle(42 degrees Celsius))
print(mangle(eeeeeee))
Output:
HELOTHRE
42DEGREES CELSUS
EEEEE

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!