filmov
tv
How To Create Analog Clock in Python |Full Python code

Показать описание
Code :
import turtle
import time
s = turtle.Screen()
watch = turtle.Turtle()
def analog(hr, min, sec, wat):
for z in range(12):
hands = [("black", 80, 12), ("black", 150, 60), ("black", 110, 60)]
time_set = (hr, min, sec)
for hand in hands:
angle = (time_part/hand[2])*360
while True:
analog(hr, min, sec, watch)
#analogclockinpython #codingtechnique #python
import turtle
import time
s = turtle.Screen()
watch = turtle.Turtle()
def analog(hr, min, sec, wat):
for z in range(12):
hands = [("black", 80, 12), ("black", 150, 60), ("black", 110, 60)]
time_set = (hr, min, sec)
for hand in hands:
angle = (time_part/hand[2])*360
while True:
analog(hr, min, sec, watch)
#analogclockinpython #codingtechnique #python