20. Interactive

In this lesson we will learn one of the most awesome aspects of programming. Responding to user input.
Lets start by clearing the screen.
The readword command prompts the user for input, when the user inserts the input and submits the program can store the value inside the variable
Please read your name into the "name variable
The user input is stored in the "name variable
Lets print the value stored in the "name variable
In the second step the program prompt to inserted some value, but it's hard to understand what do we need to insert (a name? an angel? password?) . We can prompt for input with a meaningful message using the following command: ( readword [message] )
Write the following command make"name ( readword [Please type your name] )
In Logo the readword command can be used to input a numeric value.
get number of edges into the edges variable typing the message "please enter number of edges
Now we will use the value stored in "edges in order to create a polygon
Create a polygon based on the previous input where each edge is size 100
TurtleAcademy learn programming for freeYour browser is not supporting canvasWe recomand you to use Chrome or Firefox browsers