Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 569 Bytes

README.md

File metadata and controls

42 lines (34 loc) · 569 Bytes

Python_project

from turtle import * #turtle-preinstalled

state={'turn':0}

def spinner(): clear() angle=state['turn']/10 left(angle) forward(100) dot(120,'red') back(100) left(120) forward(100) dot(120, 'red') back(100) left(120) forward(100) dot(120, 'red') back(100) left(120) update()

def animate(): if state['turn']>0: state['turn']-=1 spinner() ontimer(animate,20)

def flick(): state['turn']+=50

tracer(False) width(20) onkey(flick,'space') listen() animate() done()