Dot Art!
Goals:
- Create programs by moving the turtle and drawing dots
- Save some programs and stay organized
Coding Snippets:
- The numbers in the
rt
andlt
functions represent degrees.rt 180
makes the turtle reverse course. - The numbers in the
fd
,bk
, anddot
functions represent "relative units of distance". Your browser's current zoom setting determines just how big a single unit appears on screen. - For the
dot
function, the number determines how many units of distance the dot's diameter will be.
Math and Computer Concepts:
- Each of the coding snippets above represents a Pencil Code function. Functions either complete a task or compute a value (or both). All the function examples here complete a single task.
- Syntax is a computer science word meaning "combinations of words and symbols the program can understand". For your program to work, you must enter the code precisely as the computer expects to see it.
- Comments are notes we include in our programs, which Pencil Code knows to ignore. Create a comment anywhere using a hash tag—anything that follows on that line is for human eyes only!
Activities:
It's important for coders to stay organized! Save each of the following in a folder called DotArt. (Use the names shown in bold below.)
- Make a dot and save it in a program called DotArt/Dot. This will create the Dot program in a new folder called DotArt.
- Create a Donut or a Bullseye program. Include a comment noting the date you created the program.
- Draw a Snowman. Add eyes, mouth, and buttons. Challenge yourself: can you come up with a way to make a carrot nose (or arms) using only the functions listed above?
- Delete your Dot program. Do this by deleting all the contents of the program, and then saving it.
- Get creative!