Messaging a Python Object

Sdílet
Vložit
  • čas přidán 8. 04. 2016
  • Looks at how a die (dice) can be implemented in a Python program and shows the importance of messaging Python objects.

Komentáře • 20

  • @Mrjarnould
    @Mrjarnould Před 8 lety +6

    Just finished watching all your videos on Classes and OOP - they're great! Looking forward to seeing more OOP tutorials :)

    • @Mrjarnould
      @Mrjarnould Před 8 lety +3

      Just donated!

    • @johnphilipjones
      @johnphilipjones  Před 8 lety +3

      More on the way in the coming weeks. Thank you for the positive comments.
      Best wishes
      Phil

  • @alamgirhossien4004
    @alamgirhossien4004 Před rokem +1

    Great teacher.

  • @cristofapeeking6899
    @cristofapeeking6899 Před 6 lety +1

    Excellent. I wish all tutorials were as explicit as this.

  • @SundaraPaalRT
    @SundaraPaalRT Před 7 lety +1

    Thanks, Phil. Awesome tutorials on Python. You saved me at-least couple of weeks of reading.
    Thanks again.

  • @stavan2003
    @stavan2003 Před 7 lety +1

    Thanks a lot Phil....your series helps me look at things differently(and correctly) in python now...!!!

  • @hippy6669
    @hippy6669 Před 7 lety +1

    Thank you for all your videos. They help me a lot.

  • @abdelkrimbari6526
    @abdelkrimbari6526 Před 8 lety +4

    Thanks, good explained

  • @johnpaulpagelerjr.5188
    @johnpaulpagelerjr.5188 Před 8 lety +1

    Cheers Phil,
    Just finished your series on Python Programming... I thoroughly enjoyed your teaching style. I look forward to your next video project. Thank you for your efforts, John

    • @johnphilipjones
      @johnphilipjones  Před 8 lety +1

      Thank you for your positive comments. I will be returning to make more Python videos over the coming months. The series will take around another two years to complete. If you join the community (link below) you will get an update when I upload my next videos or follow me on twitter (link below) as I tweet every time I upload a video.
      plus.google.com/communities/108318057967049881054?partnerid=ogpy0
      twitter.com/jpjVideoTuts
      Best wishes
      Phil
      (John Philip Jones)

    • @ericlala
      @ericlala Před 7 lety +1

      Hi Phil, i just started your series on python and am enjoying your teaching style. If you are by chance taking suggestions on new videos, would you be able to get into numpy and pandas? Thanks

  • @Lennardish
    @Lennardish Před 3 lety +1

    Lovely to watch and I learned from you to make an amendment. I am standing on the shoulders of a Giant :)))) THANK YOU.
    I am also thinking now of forming a list and calculating sum and average of that list .
    import random
    i = 1
    class Die:
    def __init__(self):
    self.side = 0
    def throw(self):
    self.side = random.randint(1, 45)
    def get_value(self):
    return self.side
    my_die = Die()
    while i

  • @mafadaf5123
    @mafadaf5123 Před 8 lety

    Great vid JPJ!

  • @VamshiKanthKota
    @VamshiKanthKota Před 7 lety

    Eagerly waiting for more if you have any planned...

  • @baaley1
    @baaley1 Před 8 lety +1

    thanks

  • @zeeshanakram8751
    @zeeshanakram8751 Před 6 lety +1

    Sir! there is a question:
    is "self.side" mutable ? Question raised because the value of "self.side" changed from "0" to "6" without creating another object.

    • @johnphilipjones
      @johnphilipjones  Před 6 lety +4

      self.side is a property of the class and can be changed. However, the type of the number stored in this property is an integer. An integer is immutable and cannot be changed. So when you generate a number between 1 and 6 a different integer (i.e. object) is stored in the property.
      Best wishes
      Phil

  • @zakirhossain7413
    @zakirhossain7413 Před rokem

    So attribute is the only thing has the __init__ property? Not the methods/behaviors?

    • @johnphilipjones
      @johnphilipjones  Před rokem

      I am unclear on what you are asking here. Please contact me via the form at the link below and hopefully I will be able to help.
      www.johnphilipjones.com/contact.html
      Please ensure that you enter your email correctly.
      Best wishes Phil