Pencil Code is a collaborative programming site for drawing art, playing music, and creating games. Pencil Code is also a place to experiment with mathematical functions, geometry, graphing, webpages, simulations, and algorithms. Programs are open for all to see and copy.
The main language is Coffeescript. Professional software engineers use Coffeescript to build complex websites, but Coffeescript code can also be very simple.
|Play three notes:
Draw a gold star:
pen gold for x in [1..5] fd 100 rt 144
Follow the mouse:
speed Infinity tick 3, -> turnto lastmousemove fd 15 dot green
Programs preload the pencilcode library to use
functions such as
pen (sets the turtle's pen color),
fd (moves the turtle forward), and
(plays musical notes).
Pencil Code is all open source.
Hang out on the Pencil Code
discussion forum or check out
the quick reference
the online guide
to find out more. There is also an illustrated
Pencil Code book with more than 100 small projects.
Be Nice. Do not mess up other peoples' work. Do not post content that detracts from education on the site. This a learning space that is not locked down (for example, passwords are optional). So feel free to explore, create, and link, but also please be considerate.
Be Careful. Do not depend on Pencil Code to keep your data safe. Data posted here is public, and data is not secured from loss. Do not post private or personally identifiable information. Passwords on Pencil Code do not prevent malicious interference.
The Pencil Code Foundation, Inc., is devoted to advancing computer science education by making programming as simple and as powerful as using a pencil — firstname.lastname@example.org.