Python Playground: Drawing with the Whiteboard Widget

Getting Started with the Whiteboard The whiteboard widget gives you a canvas to draw on. Creating one is super simple: from story import create story = create() board = story.whiteboard(width=500, height=300) await story.run() Run You can customize the size to fit your needs - just adjust the width and height parameters. Drawing Basics: Shapes and Colors Rectangles: Your Building Blocks Want to draw a rectangle? Here鈥檚 how: board = story.whiteboard(width=500, height=300) # Draw a red rectangle at (x=10, y=10) with width=100 and height=50 board....

October 19, 2024 路 3 min 路 592 words 路 Cosimo Luigi Manes

Python Playground: Creating Stories with the Text Widget and KaTeX

Getting Started with Python Playground First, we need to import and initialize our story: from story import create # Create a new story story = create() Basic Text Widget Usage Here are some practical examples of how to use the Text widget: Example 1: Simple Text from story import create # Create a new story story = create() # Create a new text widget text = story.text() text.write("# Welcome to the Math Lesson!...

October 18, 2024 路 3 min 路 595 words 路 Cosimo Luigi Manes

Python Playground: Creating Stories with the Text Widget and Markdown

The Text Widget: What Is It and Why Use It? The text widget is an incredibly versatile tool that lets you insert formatted text in your Python Playground applications. The cool part? It uses markdown syntax, so if you鈥檙e already familiar with this markup language (who isn鈥檛 these days?), you鈥檙e halfway there! Getting started is super easy: from story import create story = create() text_widget = story.text() text_widget.write("My first text") The Magic of Markdown in the Text Widget Give Your Text Some Style Want to make your text more interesting?...

October 17, 2024 路 2 min 路 343 words 路 Cosimo Luigi Manes

Python Playground: Revolutionizing STEAM Education with Browser-Based Learning

Key Features of Python Playground 1. In-Browser Python Interpreter At the heart of Python Playground is a Python interpreter powered by Pyodide, a version of Python that runs entirely in the browser. This feature allows students to write, test, and execute Python code without the need for any local installations or setup. The immediate feedback and seamless coding experience make Python Playground an ideal platform for beginners and advanced learners alike....

October 3, 2024 路 2 min 路 320 words 路 Cosimo Luigi Manes

Python Playground: the Story Library - Introduction

What is a Story A Story is an interactive document similar to Jupyter Notebook. You can create a Story through the Python Playground editor by importing the story library. A Story is composed of widgets, each of which is functional to a specific use. We will now analyze the following widgets: Text Whiteboard Usage To use the library, import it as follows: from story import create Main Classes Story The main class that manages the presentation....

October 14, 2024 路 1 min 路 211 words 路 Cosimo Luigi Manes