Hi
I am trying to use the super function. I am getting the following message;
I am trying to use the super function. I am getting the following message;
Error:File "/Users/shaneshomefolder/Documents/Lists/numercial lists /inheratence_take_2.py", line 41, in __init__
super().__init__(make, model, backlight, battery, screentype)
TypeError: super() takes at least 1 argument (0 given)I am trying to follow a lesson online and am following the instructions exactly and continue to get this error. my code is ##30/04/19
##Shane Flanagan
##increment atrabutes through method
class Ereader():
"""A class to represent an ereader"""
def __init__ (self, make, model, backlight, battery, screentype):
"""inatilase the atributes to represent an ererader"""
self.make=make
self.model=modle
self.backlight=backlight
self.battery=battery
self.screentype=screentype
self.libararycount=0
def get_ereader_name(self):
"""return a formatted description for our ereader"""
long_name = self.make + " - " + self.model + " - " +self.backlight + " - " + self.battery + "-" + self.screentype
return long_name.title()
def read_libarary_count(self):
print("You Have " + str(self.libararycount) + " books in your libarary")
def update_laibary_count(self, ebook_count):
"""set the libary count"""
self.libararycount=ebook_count
def increment_libary_count(self, purchesed_ebooks):
"""add new ebboks to libary count"""
self.libararycount+=purchesed_ebooks
class KindleFire(Ereader):
"""represents aspects of an ereader spicific to a kindle fire
then initilaze atributes spicfic to a kindle fire"""
def __init__(self, make, model, backlight, battery, screentype):
"""initilize atributes of kindle fire"""
super().__init__(make, model, backlight, battery, screentype)
my_kindle_fire = KindleFire('amazon', 'kindle fire', 'backlight', 'long life', 'color screen')
print(my_kindle_fire.get_ereader_name())
