design pattern coding practical code in Python based on the folloing document https://www.techscore.com/tech/DesignPattern/index.html/