class Passport:
def __init__(self, name, surname, birthday, age, country, duration, pstart_date, pend_date):
self.name = name
self.surname = surname
self.birthday = birthday
self.age = age
self.country = country
self.duration = duration
self.pstart_date = pstart_date
self.pend_date = pend_date
def show_passport_info(self):
print("{} <-- ім'я за паспортом".format(self.name))
print("{} <-- прізвище за паспортом".format(self.surname))
print("{} <-- дата народження".format(self.birthday))
print("{} <-- вік за паспортом".format(str(self.age)))
print("{} <-- країна де видано паспорт".format(self.country))
print("{} <-- строк на який видано паспорт (в роках)".format(self.duration))
print("{} <-- дата видачі паспорту".format(self.pstart_date))
print("{} <-- дата до якої діє паспорт".format(self.pend_date))
class Passport_international(Passport):
def __init__(self, name, surname, birthday, age, country, duration, pstart_date, pend_date, visa):
Passport.__init__(name, surname, birthday, age, country, duration, pstart_date, pend_date)
self.visa = visa
pass_1 = Passport("Фи́лип", "Фрай", "1974-08-14", 37, "США", 10, "2015-01-01", "2025-01-01")
pass_1.show_passport_info()
pass_2 = Passport_international("Фи́липп", "Фрай", "1974-08-14", 37, "США", 10, "2015-01-01", "2025-01-01", "visa")
pass_2.show_passport_info()
ошибки при отработке pass_2:
Traceback (most recent call last): File "E:\Yuliia\Python\itstep\Lab\03122020_s_lab\03122020_s_lab_2.py", line 31, in pass_2 = Passport_international("Фи́липп", "Фрай", "1974-08-14", 37, "США", 10, "2015-01-01", "2025-01-01", "visa") File "E:\Yuliia\Python\itstep\Lab\03122020_s_lab\03122020_s_lab_2.py", line 24, in init Passport.init(name, surname, birthday, age, country, duration, pstart_date, pend_date)
TypeError: init() missing 1 required positional argument: 'pend_date'Process finished with exit code 1
Почему ошибка не понимаю ( Помогите
Passport.__init__
напишитеsuper().__init__