dodano klasy: danie oraz klient
This commit is contained in:
parent
f9e936fc27
commit
458a491f11
17
danie.py
Normal file
17
danie.py
Normal 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"])
|
Loading…
Reference in New Issue
Block a user