27.Getting list of inputs

This lesson will be based on program Colorful my way. We will create lines of circles from a list of inputs the user chose on runtime. We will use the following commands readlist, filled, pick and wait
Let's move to the next step
In this step we want to create the circle procedure that getting 2 parameters :size :color and creating a circle.
Create the circle procedure that getting the parameters :size :color and creating a circle using filled command
Use the circle command from the previous step.
let's create a circle size 60 with the color 'blue
We will create a row of circles from left to right in order to start from the left of the line we will set x to -300 using setx then we will want the head of the turtle turning right so we will set heading to 90. the procedure will get two parameters .. size and color and will use our previous circle procedure to create a line of 6 circles
Let's define the new circlerow procedure by typing the following: to circlerow :size :color pu setx -300 setheading 90 repeat 6 [ circle :size :color fd 120 ] pd end after that you can try it out
We will create a variable called listcolors that will get the input from the user. The command readlist will get a list of values separated by space. We also want the user to understand he should put a list of colors so we will call readlist with a message
create the listcolors variable using the readlist from the hint
We already created the circle and circlerow procedure ... we also got the list of colors in the previous step, now all we do is creating 4 lines from the list of colors we have .. in order to pick 1 color from the list each time we use the pick command ( pick :listcolors)
Please write the following: repeat 4 [ circlerow 50 pick :listcolors wait 200 pu sety repcount * 120 pd ]
TurtleAcademy learn programming for freeYour browser is not supporting canvas We recomand you to use Chrome or Firefox browsers