diff --git a/src/ex1.py b/src/ex1.py new file mode 100644 index 0000000..5535a13 --- /dev/null +++ b/src/ex1.py @@ -0,0 +1,18 @@ +def giorno_della_settimana(): + week = int(input("Inserisci il numero della settimana (1-7): ")) + + switch = { + 1: "Lunedì", + 2: "Martedì", + 3: "Mercoledì", + 4: "Giovedì", + 5: "Venerdì", + 6: "Sabato", + 7: "Domenica" + } + + day = switch.get(week, "Input non valido! Inserisci un numero della settimana tra 1 e 7.") + + return day + +print(giorno_della_settimana())