mr. lee wants your help taunting lowfaticecream! he needs you to write a code that can take a users input…

mr. lee wants your help taunting lowfaticecream! he needs you to write a code that can take a users input and print it in crazy case, where every other character is capitalized. agent 7 write a function that takes a users input and prints each letter of that input, alternating lowercase and uppercase letters. call the function. note that i need to see the def of the function and you calling the function. sample output: please enter a word for me to crazy case: potato p o t a t o
Answer
Explanation:
Step1: Define the function
def crazy_case():
user_input = input("Please enter a word for me to cRaZy CaSe: ")
result = ""
for index, char in enumerate(user_input):
if index % 2 == 0:
result += char.upper()
else:
result += char.lower()
print(result)
Step2: Call the function
crazy_case()
Answer:
The above Python code defines and calls the crazy_case function as required.