Machine Learning With Orange
Sunday, 29 June 2014
Example program of Visualization of Class in Python
http://pythontutor.com/visualize.html#code=class+Dog%3A%0A%0A++++def+__init__(self,+name)%3A%0A++++++++self.name+%3D+name%0A++++++++self.tricks+%3D+%5B%5D++++%23+creates+a+new+empty+list+for+each+dog%0A%0A++++def+add_trick(self,+trick)%3A%0A++++++++self.tricks.append(trick)%0A%0Ad+%3D+Dog('Fido')%0Ae+%3D+Dog('Buddy')%0Ad.add_trick('roll+over')%0Ae.add_trick('play+dead')%0Ad.tricks%0Ae.tricks&mode=display&origin=opt-frontend.js&cumulative=false&heapPrimitives=false&drawParentPointers=false&textReferences=false&showOnlyOutputs=false&py=2&rawInputLstJSON=%5B%5D&curInstr=21
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment