Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyClassMethod
#Python 2.7.17 #PyClassMethod #this code is created by Rezaul Hoque on December 09,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; class Book: title= 'No Title' author= 'No author' genre= 'No genre' @classmethod def genBook(cls,title,genre): return cls(title,genre) @staticmethod def banner(): print("Python Class Method") print("December 09,2021") @staticmethod def pattern(): print("##############") book1=Book() book1='Kim','Rudyard Kipling','Adventure' book2=Book() book2='Sonar Kella','Detective Thriller' Book.pattern() Book.banner() print(book1) print(book2) Book.pattern()
run
|
edit
|
history
|
help
0
single_digit
PyPropertyDecorator
tree generator
PyRangeArg
Simple code to find all divisors for a number
binary_4
Problem: fb_series
NormalizeTags
Цідило
PyStr