def sun_angle(time):
time=time.split(':')
hh=time[0]
mm=time[1]
if int(hh)==18 and int(mm)==0:
return int(180)
if 6<=int(hh)<18:
if int(mm)>0:
angle= (int(hh)-6)15+int(mm)0.25
else:
angle= (int(hh)-6)*15
return angle
else:
print("I don't see the sun!")
Created at: 2020/03/16 08:30; Updated at: 2020/03/17 08:38