+ 7
Why there is less examples and no clear explainations in the module7 of python?(oops)
Especially in this module lots of errors and non-proper explainations. In some part the quiz we're mismatching to preceeding part of the lesson. I surfed through comment section many others were not able to understand this module since 2016. Many of them quit the app especially due to this module.other modules we're so clear. You moderators please take an immediate action for improving this module. I hope this module will get an update with good examples and error free.
7 odpowiedzi
+ 6
B.Naresh Kumar OOP is not a trivial concept, so don't worry, it takes some time to learn and grasp it. I always refer to an RPG analogy when trying to explain it, and this particular example is similar.
Take a look, I have developed it a bit and added comments:
https://code.sololearn.com/c5qxQK1U0x2U/?ref=app
https://code.sololearn.com/cN0x2tl731kd/?ref=app
+ 4
ThanksKuba Siekierzyński 😊
+ 2
+ 2
Bahha🐧 thanks
I edited my question
+ 1
you didn't copy the top of the code.
class GameObject:
class_name = ""
desc = ""
objects = {}
def __init__(self, name):
self.name = name
GameObject.objects[self.class_name] = self
def get_desc(self):
return self.class_name + "\n" + self.desc
+ 1
http://openbookproject.net/thinkcs/JUMP_LINK__&&__python__&&__JUMP_LINK/english3e/
because its a bit more complex.
They have a few chapters dedicated to oop in this pdf