Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the followign function assume that the first parameter is a string that contains characters in A-Z and a-z only. The only functions you are

In the followign 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"

Step by Step Solution

3.39 Rating (152 Votes )

There are 3 Steps involved in it

Step: 1

def func2str1 printfunc2GeorgeMason str1 str2 for i in rang... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microeconomics An Intuitive Approach with Calculus

Authors: Thomas Nechyba

1st edition

538453257, 978-0538453257

More Books

Students also viewed these Programming questions