hour,minute = float(input("请输入时针:")),float(input("请输入分针:")) def degree(hour,minute): hour = hour*30%360 + minute*6/12 minute = minute*6 return abs(minute - hour) degree(hour,minute)