Understanding the Colorization of Code in VEXcode EXP Python

When creating Text projects, the syntax, spacing, indenting, and spelling in your code in very important to ensure that your project runs as intended. The color coding present in the Workspace in VEXcode EXP Python is an extra visual cue that you have entered your code into your project correctly.

If there is an unrecognizable component while typing commands into the Workspace, it will remain black (like the user-created category). This can be a useful indicator as you are working to prevent frustration or extra troubleshooting later on.

Use the cursor and keyboard to correct errors. As the components are recognized, they will be colorized correctly.

The colorization of code follows the following conventions:

Classes

Screen_Shot_2022-02-07_at_2.36.10_PM.png

The individual device the command pertains to (i.e. drivetrain, pen, brain)

Commands

Screen_Shot_2022-02-07_at_2.37.13_PM.png

The behavior within the command (i.e. drive, turn)

Parameters

Screen_Shot_2022-02-07_at_2.37.56_PM.png

Information about how the behavior executes (i.e. direction, distance)

Structures

Screen_Shot_2022-02-08_at_2.55.01_PM.png

Control the flow of the project (i.e. conditionals, loops)

Values

Screen_Shot_2022-02-07_at_3.14.13_PM.png

Numerical parameter assigned to the behavior (i.e. number of degrees of a turn)

User Created

Screen_Shot_2022-02-08_at_2.57.23_PM.png

User created variables and commands

Comments

Comments.png

The text following a # that will not effect the program.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus