- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
def make_coffie(water_amount: int = 0) -> object:
class Coffie_Constructor:
def __init__(self, beans_amount: int = 0):
self.water_amount = water_amount
self.beans_amount = beans_amount
def __call__(self, milk_amount: int = 0) -> int:
return self.water_amount + self.beans_amount + milk_amount
def __repr__(self) -> str:
return 'Not enought call brakets were given'
return Coffie_Constructor
print(make_coffie(120)(50)(50))
Stallman 09.11.2022 15:57 # +1
inkanus_gray 09.11.2022 17:15 # 0
guest6 09.11.2022 19:41 # 0
rockkley94 10.11.2022 09:50 # 0
ISO 10.11.2022 09:57 # 0
Stallman 10.11.2022 11:53 # 0
guest6 10.11.2022 14:37 # 0
Alina_Poksenova 11.11.2022 06:29 # 0
nyTuH_nugop 10.11.2022 18:19 # 0
guest6 10.11.2022 18:30 # +1
https://www.youtube.com/watch?v=zxqvFT4eGUI
nyTuH_nugop 10.11.2022 18:38 # 0
Don't misunderestimate me!
rockkley94 11.11.2022 00:50 # 0
Soul_re@ver 11.11.2022 00:55 # 0
Rooster 11.11.2022 06:19 # 0