Answer to Question #217122 in Python for omcool

Question #217122

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-16T01:06:37-0400



class NAME(object):


    def _init_(self,names):


        self.names = names


    def _repr_(self):


        name = self.names.upper()


        return name












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))


print(string1)
print(string)

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