PencilCoder

Dot Art!

Goals:

  • Create programs by moving the turtle and drawing dots
  • Save some programs and stay organized

Coding Snippets:

  • coding snippets
  • The numbers in the rt and lt functions represent degrees. rt 180 makes the turtle reverse course.
  • The numbers in the fd, bk, and dot 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!
  • Example Comment

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.)