Answer to Question #217137 in Python for Rajeev Tomar

Question #217137
Consider two classes to store the names of people. Class NAME will store the name in upper case and Class name will store in lower case. Write a program to convert the uppercase name to a lowercase name.
1
Expert's answer
2021-07-14T07:37:01-0400
class NAME(object):
    def __init__(self,names):
        self.names = names
    def __repr__(self):
        name = self.names.upper()
        return name
Name('David')


class name(object):
    def __init__(self,names):
        self.names = names
    def __repr__(self):
        name = self.names.lower()
        return name
string = NAME('David')
string1 = name(str(string))
string1

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS