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: 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