May-07-2019, 08:07 PM
HI
i am getting an error for incorrect indentation but can not find the error.
i am getting an error for incorrect indentation but can not find the error.
##30/04/19 ## ##increment attributes through method class Ereader(): """A class to represent an ereader""" def __init__ (self, make, model, backlight, battery, screentype): """initialise the atributes to represent an ererader""" self.make=make self.modle=model 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, purchased_ebooks): """add new ebboks to libary count""" self.libararycount+=purchased_ebooks class Screen(): """create a class to model the screen of a kindle fire""" def__init__ (self, screen_resoloution='1280*800') """initialise the screens attributes""" self.screen_resoloution=screen_resoloution def describe_screen(self): """print out some marketing information about the kindle fire""" ##this tells the child class to call the features from the parent class print("fire HD 8 features a wide screen " + self.screen_resoloution+ " HD screen.") class Kindlefire(Ereader): """represents aspects of an ereader specific to a kindle fire then initialise atributes specific to a kindle fire""" def __init__ (self, make, modle, backlight, battery, screentype): """initialize attributes for the kindle fire""" super().__init__(make, modle, backlight, battery, screentype) self.firescreen=Screen my_kindle_fire = Kindlefire('amazon', 'kindlefire', 'backlight', '12 hour battrey life', 'colorscreen') print(my_kindle_fire.get_ereader_name()) my_kindle_fire.firescreen.describe_screen()