Logic#
The Logic pages collect the Python tools that control project flow, store data, organize reusable code, and handle common calculations or formatting. Start here when you need loops, timers, variables, functions, and other core coding tools.
Control - Let you manage the flow of your program.
Timer - Measure durations, trigger events after a set time, or reset for new timing operations.
Variables - Hold information you want to save and use.
Functions - Group commands into reusable chunks of code.
Events - Help you react to triggers like sensor changes or button presses.
Math - Built-in functions and the full
mathmodule for calculations.Random - Generate random numbers and select random values.
Additional pages help you compare values, document code, format output, and use utilities such as custom colors or threads when they are available on this platform:
Operators - Let you compare values, combine expressions, and perform logical tests.
Comments - Let you describe what your code does without affecting how it runs.
Custom Colors allow you to define your own RGB or hex color values.
String Formatting - Explains how to format text, numbers, and output using f-strings.
Threads - Allow parts of your program to run in parallel.
All together, they help you code projects that make decisions, respond in real-time, and keep your code neat and easy to understand.