Question: Write a program that uses string methods with the variable, clue MisS sCarleT in The cOnServaTory WitH the roPE to perform the following operations: 1.

Write a program that uses string methods with the variable, clue MisS sCarleT in The cOnServaTory WitH the roPE to perform the following operations: 1. Write a single statement that converts the string in clue to lower case and stores it in a new variable named clue_lower. Write another statement to print clue_lower. 2. Write a single statement that switches the case of every character in clue and saves the result to a variable named clue_swapped. Print clue_swapped. 3. Write a single statement that prints how many "'s" and "S" characters are in clue. 4. Write a single statement that capitalizes each word in clue (like a title would be written). Save the result in a variable called clue title and print the variable. 5. Write a single statement that replaces every"" in clue with "RR 6. Write a single statement to remove the whitespace from the ends of clue and save the result back to the clue variable. 7. Write a single statement that uses the len function, string slicing, the string find and the string capitalize methods to take the string "MisS sCarleT" from the clue string and capitalize it before printing it. Start with multiple statements then combine them into a single statement. https://docs.python.org/3.7/library/stdtypes.html? highlight-find#str.find 8. Write a single statement that uses the len function, string slicing, the string find and the string upper method to take the word "roPE" from the clue string and convert it to upper case before printing it. 9. Write a single statement that uses the len function, string slicing, and the string find method to print the word "cOnServaTory" from the clue string. 10. Write a single statement that creates a copy of clue and saves it in a variable called clue_copy
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
