Function 2: In this function assume that the first parameter is a string that contains characters in
Fantastic news! We've Found the answer you've been seeking!
Question:
Function 2: In this function assume that the first parameter is a string that contains characters in A-Z and a-z only. The only functions you are allowed to use are range(), len(), chr(), ord().
YOU CAN NOT USE .upper or .lower, can only use the functions said above.
• Examples:
◦ func2("GeorgeMason") → "GeorgeMason"
◦ func2("GeorgeMason", "upper", 2, 3) → "GeORgeMason"
◦ func2("GeorgeMason", "upper", 5) → "GeorgEMASON"
◦ func2("GeorgeMason", "lower") → "georgemason"
◦ func2("GeorgeMason", s=8, c="upper") → "GeorgeMaSON"
◦ func2("GeorgeMason", "lower", e=0) → "georgeMason"
Related Book For
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Posted Date: