Python-programming-exercises icon indicating copy to clipboard operation
Python-programming-exercises copied to clipboard

question 9: Using class

Open CHAMP-123 opened this issue 6 years ago • 0 comments

class Capital: def init(self): self.s='' def line(self,a): self.s=a def printstr(self): print(self.s.upper())

obj=Capital() obj.line('''Hello World! Let's party!''') obj.printstr()

I have tried doing it using class keyword in python 3.7. Hope it's acceptable!

CHAMP-123 avatar Jul 12 '19 10:07 CHAMP-123