Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
walrus one-liner solution in Clear category for The Digital Botanist by Max0526
def get_watering_advice(plant, day, damp): c = 1 + day / dct[plant] * (1 - damp) \
if plant in (dct := {'Succulent': 12,'Tropical': 3,'Default': 7}) else 0; \
return ['Unknown plant type', 'Do not water', 'Check the soil again tomorrow', \
'Water the plant'][int(c) + (c > 2)]
Nov. 2, 2025