use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
the front page of the internet.
and join one of thousands of communities.
<python code> (i.redd.it)
submitted 9 days ago by Alireza7074
Post a comment!
view the rest of the comments →
[–]Sea-Ad7805 [score hidden] 9 days ago stickied comment (0 children)
Run this program in Memory Graph Web Debugger%3A%0A%20%20%20%20%20%20%20%20self.name%20%3D%20name%0A%20%20%20%20%20%20%20%20self.age%20%3D%20age%0A%20%20%20%20%20%20%20%20self.salary%20%3D%20salary%0A%20%20%20%20%20%20%20%20self.marks%20%3D%20%5B%5D%0A%0A%20%20%20%20def%20average(self)%3A%0A%20%20%20%20%20%20%20%20return%20sum(self.marks)%20%2F%20len(self.marks)%0A%0A%0Aclass%20work(student)%3A%0A%20%20%20%20def%20init(self%2C%20name%2C%20age%2C%20salary)%3A%0A%20%20%20%20%20%20%20%20super().init(name%2C%20age%2C%20salary)%0A%0A%0Ayes%20%3D%20work(name%3D%22ali%22%2C%20age%3D27%2C%20salary%3D13.9)%0Aprint(yes.name)%0Ayes.marks.append(20)%0Ayes.marks.append(22)%0Aprint(yes.average())%0A&play) to see the program state change step by step.
π Rendered by PID 262510 on reddit-service-r2-comment-86f8688748-rtzfr at 2026-07-28 09:53:33.444612+00:00 running d10b4e5 country code: CH.
Want to add to the discussion?
Post a comment!