3 Answers
+ 5
Where is your attempt?
https://www.sololearn.com/discuss/333866/?ref=app
0
you need to advance a little bit in the Python Core course to start learning OOP (class) in Python ;)
roughly, a (basic) class is defined by:
class MyClassName:
def __init__(self,model,color,cost):
self.model = model
self.color = color
self.cost = cost
and an object is instancied (created) by calling the class constructor:
obj = MyClassName("boat","white",8)
arguments are pased to __init__ magic method initializer, and instance is implicitly returned...
0
Thank you so much