Odpowiedź:
import turtle
def kwadrat(x):
turtle.forward(x)
turtle.left(90)
def kwadratPRAWY(x):
turtle.right(90)
def prostokat(x,y):
turtle.forward(y)
def prostokatPRAWY(x,y):
prostokat(336,210)
turtle.forward(145)
turtle.forward(70)
turtle.forward(46)
turtle.left(180)
turtle.backward(145 + 46)
turtle.forward(30)
turtle.up()
turtle.forward(15)
turtle.down()
turtle.circle(5)
turtle.backward(15)
turtle.forward(145 + 46)
turtle.forward(210)
turtle.left(70)
turtle.forward(179)
turtle.left(40)
turtle.backward(155)
kwadrat(36)
prostokat(18,36)
prostokat(36,18)
turtle.backward(30)
turtle.forward(55)
turtle.forward(336)
kwadratPRAWY(36)
prostokatPRAWY(18,36)
prostokatPRAWY(36,18)
turtle.forward(210 - 55)
turtle.backward(336 + 50)
turtle.mainloop()
Wyjaśnienie:
Czy taki może być?
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
Odpowiedź:
import turtle
import turtle
def kwadrat(x):
turtle.forward(x)
turtle.left(90)
turtle.forward(x)
turtle.left(90)
turtle.forward(x)
turtle.left(90)
turtle.forward(x)
turtle.left(90)
def kwadratPRAWY(x):
turtle.forward(x)
turtle.right(90)
turtle.forward(x)
turtle.right(90)
turtle.forward(x)
turtle.right(90)
turtle.forward(x)
turtle.right(90)
def prostokat(x,y):
turtle.forward(x)
turtle.left(90)
turtle.forward(y)
turtle.left(90)
turtle.forward(x)
turtle.left(90)
turtle.forward(y)
turtle.left(90)
def prostokatPRAWY(x,y):
turtle.forward(x)
turtle.right(90)
turtle.forward(y)
turtle.right(90)
turtle.forward(x)
turtle.right(90)
turtle.forward(y)
turtle.right(90)
prostokat(336,210)
turtle.forward(145)
turtle.left(90)
turtle.forward(70)
turtle.right(90)
turtle.forward(46)
turtle.right(90)
turtle.forward(70)
turtle.right(90)
turtle.left(180)
turtle.forward(145)
turtle.backward(145 + 46)
turtle.left(90)
turtle.forward(30)
turtle.right(90)
turtle.up()
turtle.forward(15)
turtle.down()
turtle.circle(5)
turtle.up()
turtle.backward(15)
turtle.down()
turtle.right(90)
turtle.forward(30)
turtle.left(90)
turtle.forward(145 + 46)
turtle.left(90)
turtle.forward(210)
turtle.left(70)
turtle.forward(179)
turtle.left(40)
turtle.forward(179)
turtle.left(70)
turtle.forward(210)
turtle.backward(155)
turtle.left(90)
turtle.up()
turtle.forward(30)
turtle.down()
kwadrat(36)
prostokat(18,36)
prostokat(36,18)
turtle.up()
turtle.backward(30)
turtle.down()
turtle.left(90)
turtle.forward(55)
turtle.right(90)
turtle.forward(336)
turtle.right(90)
turtle.forward(55)
turtle.right(90)
turtle.up()
turtle.forward(30)
turtle.down()
kwadratPRAWY(36)
prostokatPRAWY(18,36)
prostokatPRAWY(36,18)
turtle.up()
turtle.backward(30)
turtle.left(90)
turtle.forward(210 - 55)
turtle.left(90)
turtle.backward(336 + 50)
turtle.down()
turtle.mainloop()
Wyjaśnienie:
Czy taki może być?