Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python question
#1
Hello! I am a beginner and I need help. What's the problem with this syntex? Thanks for the help

class Alma

    def __init__(x):

        self.x = x

    def count(self,x):

        self.x = x+1

class ZoldAlma:

    def __init__(self, y=0):

        Alma.__init__(self, 3)

        self.y = y

    def count(self):

        self.y += 1     

def main():

    obj = ZoldAlma()

    obj.count()

    print(obj.x, obj.y)

main()
Reply


Messages In This Thread
python question - by strekasz - Mar-17-2020, 02:04 PM
RE: python question - by jefsummers - Mar-17-2020, 04:08 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020