Quelqu'un pour m'aidez sur le script en Python svp ?

Bonsoir, ci-dessous le programme python correspondant à l'exercice.
Si tu as des questions par rapport à ce dernier n'hésites pas, je peux détailler ligne par ligne au besoin (Fais bien attention aux tabulations)
PS : J'ai fais au plus simple et au plus rapide mais ça marche.
def temperature(n):
if 22 <= n <= 24 or 1 <= n <= 6 or n == 0:
print(16)
elif 6 <= n <= 8 or 18 <= n <= 22:
print(20)
else:
print(18)