Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

bellcode / lesson12-2

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • lesson12-2
  • ggg.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 26c072b9
    BellCodeEditor committed 4 years ago
    26c072b9
ggg.py 323 Bytes
Edit
1 2 3 4 5 6 7 8 9 10 11 12
class Cat:
    def __init__(self,type,color,price):
        self.footNum = 4
        self.type = type
        self.color = color
        self.price = price
    def say_price(self):
        print("波斯猫价格为"+str(self.price)+"元")
aninal = Cat("波斯猫","white",4000)
aninal.say_price()