Skulpt to use Python in Markdown
This is an example article showing how to embed Skulpt and Ace code editor to use Python.
- Skulpt is an entirely in-browser implementation of Python.
- Tutorial w. simple Python turtle code used while doing TA works.
Try This
import turtle as t
print("Drawing Ryan...")
t.shape("turtle")
t.speed(7)
t.fillcolor("#f7aa1b")
t.pencolor("#111111")
t.pensize(10)
print("Left Ear...")
t.penup()
t.goto(-120, 120)
t.pendown()
t.begin_fill()
t.circle(50)
t.end_fill()
t.penup()
t.goto(120, 120)
print("Right Ear...")
t.pendown()
t.begin_fill()
t.circle(50)
t.end_fill()
t.penup()
t.goto(0, -200)
print("Face...")
t.pendown()
t.begin_fill()
t.circle(200)
t.end_fill()
t.penup()
t.pensize(15)
t.goto(-120, 60)
print("Left Eyebrow...")
t.pendown()
t.goto(-50, 60)
t.penup()
t.goto(120, 60)
t.pendown()
print("Right Eyebrow...")
t.goto(50, 60)
t.penup()
t.goto(-80, 15)
print("Left Eye...")
t.pendown()
t.fillcolor("#111111")
t.begin_fill()
t.circle(6)
t.end_fill()
t.penup()
t.goto(80, 15)
print("Right Eye...")
t.pendown()
t.fillcolor("#111111")
t.begin_fill()
t.circle(6)
t.end_fill()
t.penup()
t.goto(-7, -25)
print("Mouth...")
t.pendown()
t.fillcolor("#ffffff")
t.begin_fill()
t.left(135)
t.circle(32, 290)
t.right(130)
t.circle(32, 290)
t.end_fill()
t.penup()
t.home()
t.goto(0, -30)
print("Nose...")
t.pendown()
t.begin_fill()
t.circle(8)
t.end_fill()
print("Done!")
t.hideturtle()