We have created some programs with examples of how to set timers, use event handlers, and draw shapes in our Bryton editor. All teachers and students can fork a copy of the programs to try out the code!
This program shows how to call a function on a delay using
timer.set_interval . You can check out the program here.
This program shows how to create a "click to pause" timer in Brython. You can check out the code here.
X and Y coordinate on
This code will allow you to track mouse movement event method similar to
This program shows how to remove event handlers after an event.
Click Image for Effect
Click image for effect will add images to a canvas and do different things based on which image the user clicks in CSP / Brython. You can check out the code here.
Lines and Shapes in Brython
Lines at Angles
This program will show you how to draw a line in Brython and use a formula in a function to set the angles. You can check out the code here.
This program will show you how to draw an ellipse, circle, ranuculoid, and fill in or outline them. You can check out the code here.
Still have questions? Contact our team at email@example.com to learn more!