Function Name: fixGiftCard() Parameters: promoCode (str) Returns: fixed PromoCode (str) Description: You've won a Amazon

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Function Name: fixGiftCard() Parameters: promoCode (str) Returns: fixed PromoCode (str) Description: You've won a Amazon

Post by answerhappygod »

Function Name Fixgiftcard Parameters Promocode Str Returns Fixed Promocode Str Description You Ve Won A Amazon 1
Function Name Fixgiftcard Parameters Promocode Str Returns Fixed Promocode Str Description You Ve Won A Amazon 1 (55.24 KiB) Viewed 28 times
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'
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply