P5 Python Docs
Search
K

Getting Started

How to get up and running with p5-python-web
To get started, go to code.strivemath.com.
⬆ This is the basic starter template - you can begin coding right away and don't need an account to start
1
def setup():
2
createCanvas(400,400)
3
4
def draw():
5
background("red")
6
drawTickAxes()
  • Code put into setup() will execute once, when the canvas initializes.
  • Code put into draw() will execute repeatedly, 60 times per second. Each execution is called a frame.
  • Try out putting some code - for example from the Shapes section - into the setup() and draw() functions and see what happens! Happy Coding 😁
Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!
We'd love to hear your Feedback/Comments here.
Last modified 10mo ago