Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Sun angle solution in Clear category for Sun Angle by KirillovaV
def sun_angle(time):
DEGREE_PER_MIN = 0.25 # 180 degrees in 12 hours (720 minutes)
MIN = 360 # 06:00 in minutes
MAX = 1080 # 18:00 in minutes
now = int(time.split(':')[0])*60 + int(time.split(':')[1]) # current time in minutes
if MIN <= now <= MAX:
return (now - MIN) * DEGREE_PER_MIN
return "I don't see the sun!"
Jan. 21, 2021