Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
5-liner: simple solution in Clear category for Sun Angle by przemyslaw.daniel
def sun_angle(time):
hour, min = map(int, time.split(':'))
if 6*60 <= 60*hour+min <= 18*60:
return round((hour*60+min-360)/(12*60)*180, 2)
return "I don't see the sun!"
April 24, 2018