Untitled
unknown
python
7 months ago
756 B
2
Indexable
Never
#Zad 6 class Book: def __init__(self="X",author="X",title="X",year="X",price="X"): self.author = author self.title = title self.year = year self.price = price def input_book(self,author,title,year,price): self.author = author self.title = title self.year = year self.price = price def print_book(self): print(f"Autor ksiązki:{self.author}, tytuł ksiązki: {self.title}, rok wydania ksiazki: {self.year},cena ksiazki: {self.price} ") def discount(self): self.price = self.price*0.8 ksiazki = [] for i in range(10): book = Book() author = names.get_first_name() title = names.get_last_name()