Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyClass
#Python 2.7.17 #PyClass #this code is created by Rezaul Hoque on December 08,2021;contact: jewelmrh@yahoo.com #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; from enum import Enum class Weath(Enum): A='GOOD' B='BAD' C='UGLY' class WeDay: day='Today' date='December 08,2021' sun='sunny' @staticmethod def pattern(): print("~~~~~~~~~~~~~~~~~~") print("~~~~~~~~~~~~~~~~~~") @staticmethod def banner(self): print("Python class example ") print(self.date) def DescDay(self): print(self.day," is a ") print(repr(Weath.A)) print(" day & ",self.sun) print (" It's time to take a walk. ") Weather = WeDay() Weather.day='Tuesday' Weather.pattern() Weather.banner(Weather) Weather.DescDay() Weather.pattern()
run
|
edit
|
history
|
help
0
Printing
Date time
WoW
1.problem_name_1
Chain
rstring
Rectangle Area
PyPropertyClass
Demo - Test
Type lala suthar