MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / draw_hand

Function draw_hand

projects/AnalogClock/analog_clock.py:35–39  ·  view source on GitHub ↗
(x, y, angle, length, width)

Source from the content-addressed store, hash-verified

33
34
35def draw_hand(x, y, angle, length, width):
36 radian_angle = angle * (pi / 180)
37 end_x = x + length * cos(radian_angle)
38 end_y = y - length * sin(radian_angle)
39 canvas.create_line(x, y, end_x, end_y, width=width)
40
41
42root = tk.Tk() # Creating the main window

Callers 1

update_clockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected