Corrige le sens du vent.
This commit is contained in:
28
main.py
28
main.py
@@ -74,28 +74,28 @@ def display_full(data):
|
||||
def diplay_wind_direction(degrees: float) -> str:
|
||||
""" Retourne une fleche indicant la direction du vent"""
|
||||
if 22.5 <= degrees < 67.5:
|
||||
return '↗'
|
||||
|
||||
if 67.5 <= degrees < 112.5:
|
||||
return '→'
|
||||
|
||||
if 112.5 <= degrees < 157.5:
|
||||
return '↘'
|
||||
|
||||
if 157.5 <= degrees < 202.5:
|
||||
return '↓'
|
||||
|
||||
if 202.5 <= degrees < 247.5:
|
||||
return '↙'
|
||||
|
||||
if 247.5 <= degrees < 292.5:
|
||||
if 67.5 <= degrees < 112.5:
|
||||
return '←'
|
||||
|
||||
if 292.5 <= degrees < 337.5:
|
||||
if 112.5 <= degrees < 157.5:
|
||||
return '↖'
|
||||
|
||||
if 157.5 <= degrees < 202.5:
|
||||
return '↑'
|
||||
|
||||
if 202.5 <= degrees < 247.5:
|
||||
return '↗'
|
||||
|
||||
if 247.5 <= degrees < 292.5:
|
||||
return '→'
|
||||
|
||||
if 292.5 <= degrees < 337.5:
|
||||
return '↘'
|
||||
|
||||
return '↓'
|
||||
|
||||
|
||||
def coloring_temperature(temperature: float) -> str:
|
||||
""" A partir de la température retourne une chaine de caractères colorisée """
|
||||
|
Reference in New Issue
Block a user