File: /home/jony/Desktop/clock_angle.py #clock angle version 4 #clock angle version 5 #another angle #another angle #another #clock angle versino 2 def angle_clock(hour, minute): if hour == 12: hour = 0 if hour > 12: hour = hour - 12 # print(hour) hour_angle = hour * 30 + minute * 0.5 minute_angle = minute * 6 # print(hour_angle) # print(minute_angle) return abs(minute_angle - hour_angle) print(angle_clock(11 ,50)) print(angle_clock(11 ,30))
Page 1 of 1