Simple Arithmetic, Input and Output in Python
Drawing Circles with Input
The initial radius can be specified by the user:
import turtle
radius = int (input("Please enter the initial radius: "))
turtle.speed(8)
turtle.pensize(5)
turtle.pencolor("Green")
turtle.circle(radius)
radius += 10
turtle.pencolor("Blue")
turtle.circle(radius)
radius += 10
turtle.pencolor("Orange")
turtle.circle(radius)
radius += 10
turtle.pencolor("Pink")
turtle.circle(radius)
radius += 10
turtle.pencolor("Red")
turtle.circle(radius)
radius += 10
turtle.pencolor("Purple")
turtle.circle(radius)
radius += 10
turtle.pencolor("Magenta")
turtle.circle(radius)
radius += 10
turtle.pencolor("Cyan")
turtle.circle(radius)
radius += 10
turtle.pencolor("Yellow")
turtle.circle(radius)
turtle.done()