mirror of
https://github.com/DavidGailleton/42-Piscine_Python.git
synced 2026-01-27 01:01:59 +00:00
piscine 00
This commit is contained in:
9
00/ex7/ft_seed_inventory.py
Normal file
9
00/ex7/ft_seed_inventory.py
Normal file
@@ -0,0 +1,9 @@
|
||||
def ft_seed_inventory(seed_type: str, quantity: int, unit: str) -> None:
|
||||
if unit == "packets":
|
||||
print(seed_type.capitalize(), "seeds:", quantity, unit, "available")
|
||||
elif unit == "grams":
|
||||
print(seed_type.capitalize(), "seeds:", quantity, unit, "total")
|
||||
elif unit == "area":
|
||||
print(seed_type.capitalize(), "seeds:", "covers", quantity, "square meters")
|
||||
else:
|
||||
print("Unknown unit type")
|
||||
Reference in New Issue
Block a user