Logic#

The Logic pages are about how your VEXcode project “thinks” and acts in different situations:

  • 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 math module for calculations.

  • Random – Generate random numbers and select random values.

Other pages help you format data, define colors, and use tools built into Python:

  • Operators do things like math and comparisons.

  • Comments help you remember what each part of your code does.

All together, they help you code projects that make decisions, respond in real-time, and keep your code neat and easy to understand.