dodano klasy: danie oraz klient

This commit is contained in:
s481851 2024-04-04 04:22:06 +02:00
parent f9e936fc27
commit 458a491f11
2 changed files with 24 additions and 0 deletions

17
danie.py Normal file
View File

@ -0,0 +1,17 @@
class Danie:
def __init__(self,typ,skladniki):
self.typ = typ
if typ == "pizza":
self.skladniki.append("sos","ser")
elif typ == "spaghetti":
self.skladniki.append("makaron")
self.skladniki.append(skladniki)
margharita = Danie("pizza",[])
vesuvio = Danie("pizza",["szynka"])
capriciossa = Danie("pizza",["szynka","pieczarki"])
bolognese = Danie("spaghetti",["sos boloński","pomidory","czosnek","marchew"])
carbonara = Danie("spaghetti",["jajko","boczek"])

7
klient.py Normal file
View File

@ -0,0 +1,7 @@
class Klient:
def __init__(self, imie, nazwisko):
self.imie = imie
self.nazwisko = nazwisko
k1 = Klient("Jan","Kowalski")
k2 = Klient("Michal","Nowak")