Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle
- window = turtle.Screen()
- t = turtle.Turtle()
- a = int(input())
- r = int(input())
- # круг
- t.penup()
- t.forward(r)
- t.left(90)
- t.pendown()
- t.circle(r)
- t.penup()
- t.right(90)
- t.goto(-a / 2, a / 2)
- # квадрат
- t.pendown()
- t.forward(a)
- t.right(90)
- t.forward(a)
- t.right(90)
- t.forward(a)
- t.right(90)
- t.forward(a)
- print("Я построил квадрат со стороной:", a, "и круг с радиусом:", r)
- turtle.done()
Advertisement
Add Comment
Please, Sign In to add comment