feat: Initial commit

This commit is contained in:
2024-03-22 17:01:42 +01:00
parent 954985f39a
commit c343ff6e93
106 changed files with 143428 additions and 1 deletions

27
Laboratorio3/seasons.py Normal file
View File

@@ -0,0 +1,27 @@
from sys import exit
month = int(input("Inserisci il mese: "))
day = int(input("Inserisci il giorno: "))
if 1 <= month <= 3:
mw = "Winter"
elif 4 <= month <= 6:
mw = "Spring"
elif 7 <= month <= 9:
mw = "Summer"
elif 10 <= month <= 12:
mw = "Fall"
else:
exit("Invalid month")
if month % 3 == 0 and day >= 21:
if mw == "Winter":
mw = "Spring"
elif mw == "Spring":
mw = "Summer"
elif mw == "Summer":
mw = "Fall"
elif mw == "Fall":
mw = "Winter"
print("La stagione è ", mw)