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
Posted by Unknown at 22:47
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Unknown
View my complete profile

Blog Archive

  • ▼  2014 (17)
    • ►  August (1)
    • ►  July (2)
    • ▼  June (5)
      • use of Super() in-built python function
      • Inheritance vs. Composition in Python
      • Example program of Visualization of Class in Python
      • Finding norm
      • Stemming defined inside class in python
    • ►  May (4)
    • ►  April (5)
Simple theme. Powered by Blogger.