Function Name: fixGiftCard() Parameters: promoCode (str) Returns: fixed PromoCode (str) Description: You've won a Amazon
Posted: Mon Jun 06, 2022 1:49 pm
pls solve it as Python
Function Name: fixGiftCard() Parameters: promoCode (str) Returns: fixed PromoCode (str) Description: You've won a Amazon gift card for your next order!! Unfortunately, Amazon messed up the promotion codes for your order. Each lowercase letter in the ticket number is meant to be uppercase, and each uppercase letter is meant to be lowercase. Write a function that takes in the promotion code (a string of letters and numbers) and returns a string with the corrected code; that is, with each lowercase letter now uppercase, and each uppercase letter now lowercase. Note: The .isupper() and .islower() methods might be helpful here. >>> fixGiftCard ("tC2Rhf5Y7b") 'Tc2rHF5y7B' >>> fixGiftCard("r88YuHHn4V") 'R88yUhhN4v'
Function Name: fixGiftCard() Parameters: promoCode (str) Returns: fixed PromoCode (str) Description: You've won a Amazon gift card for your next order!! Unfortunately, Amazon messed up the promotion codes for your order. Each lowercase letter in the ticket number is meant to be uppercase, and each uppercase letter is meant to be lowercase. Write a function that takes in the promotion code (a string of letters and numbers) and returns a string with the corrected code; that is, with each lowercase letter now uppercase, and each uppercase letter now lowercase. Note: The .isupper() and .islower() methods might be helpful here. >>> fixGiftCard ("tC2Rhf5Y7b") 'Tc2rHF5y7B' >>> fixGiftCard("r88YuHHn4V") 'R88yUhhN4v'