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.
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)
Comments
Leave a comment