Question: I'm typing a program where Olympic rings are drawn according to input (radius). My question is, given the input, how do I get the position coordinates (x,y) to scale accordingly?

The default radius I had for them to all match up is 70. Enter 70.

Here's my code:

```
radius =input('Enter the radius of your circle: ') #Asking for radius of the circle
r = float(radius)

import turtle
t = turtle.Turtle
t = turtle.Turtle(shape="turtle")

#Circle one
t.pensize(10)
t.penup()
t.goto(0,0)
t.pendown()
t.color("green") #Adds Green
t.circle(r)
#Circle two
t.penup()
t.setposition(-160,0)
t.pendown()
t.color("yellow") #Adds yellow
t.circle(r)
#Circle three
t.penup()
t.setposition(110,60)
t.pendown()
t.color("red") #Adds red
t.circle(r)
#Circle four
t.penup()
t.setposition(-70,60)
t.pendown()
t.color("black") #Adds black
t.circle(r)
#Circle five
t.penup()
t.setposition(-240,60)
t.pendown()
t.color("blue") #Adds blue
t.circle(r)

```

Answer: 
How about scaling the coordinates accordingly?

Code -

```
radius =input('Enter the radius of your circle: ') #Asking for radius of the circle
r = float(radius)

x = r / 70

import turtle
t = turtle.Turtle
t = turtle.Turtle(shape="turtle")

#Circle one
t.pensize(10)
t.penup()
t.goto(0,0)
t.pendown()
t.color("green") #Adds Green
t.circle(r)
#Circle two
t.penup()
t.setposition(-160 * x,0)
t.pendown()
t.color("yellow") #Adds yellow
t.circle(r)
#Circle three
t.penup()
t.setposition(110 * x,60 * x)
t.pendown()
t.color("red") #Adds red
t.circle(r)
#Circle four
t.penup()
t.setposition(-70 * x,60 * x)
t.pendown()
t.color("black") #Adds black
t.circle(r)
#Circle five
t.penup()
t.setposition(-240 * x,60 * x)
t.pendown()
t.color("blue") #Adds blue
t.circle(r)

```

You can also scale the pensize according to the input.
What you need is a multiplicator. Your code is really repetetive though, whenever you've got something like this you want to use a loop instead of a bunch of commands, this will make your code easier to maintain and more readable. This would be my approach:

```
radius =input('Enter the radius of your circle: ') #Asking for radius of the 

circle
r = float(radius)

import turtle
t = turtle.Turtle(shape="turtle")

m = r/70

colors = ["green", "yellow", "red", "black", "blue"]
coordinates = [(1,1), (-160,0), (110,60), (-70,60), (-240,60)]

t.pensize(10)

for i in range(len(coordinates)):
    t.penup()
    t.goto(coordinates[i][0]*m, coordinates[i][1]*m)
    t.pendown()
    t.color(colors[i])
    t.circle(r)

```

It would be even better and more flexible to normalize the points and multiply them by a constant.