Дана программа. нужно добавить кнопку смены ширины кисти и смены цвета. 100
from turtle import*

t=turtle()
t.color("red")
t.shape("circle")
step=50

def stepup():
if t.ycor()> 250:
t.goto(t..ycor()-step)
else:
t.goto(t..ycor()+step)
def stepdown():
if t.ycor()< -250:
t.goto(t..ycor()+step)
else:
t.goto(t..ycor()-step)

def stepright():
if t.xcor()> 250:
t.goto(t.xcor()-step,t.
else:
t.goto(t.xcor()+step,t.

def stepleft():
if t.xcor()< -250:
t.goto(t.xcor()+step,t.
else:
t.goto(t.xcor()-step,t.

scr=t.getscreen()

scr.onkey(stepup,'up')
scr.onkey(stepdown,'down')
scr.onkey(stepleft,'left')
scr.onkey(stepright,'right')

scr.listen()

RegexArtSek RegexArtSek    3   24.11.2019 17:03    0

Другие вопросы по теме Информатика