This commit is contained in:
lfirmin
2026-01-07 21:42:11 +01:00
parent d02ef5f88a
commit 11040c45b8
25 changed files with 572 additions and 3 deletions
@@ -0,0 +1,17 @@
def test_temperature():
print("=== Garden Temperature Checker ===")
user_input = input("Testing temperature: ")
try:
temperature = int(user_input)
except ValueError:
print(f"Error: {user_input} is not a valid number")
return
if temperature < 0:
print(f"Error: {temperature}°C is too cold for plants (min 0°C)")
if temperature > 40:
print(f"Error: {temperature}°C is too hot for plants (min 0°C)")
else:
print(f"Temperature {temperature}°C is perfect for plants!")
test_temperature()