Skip to main content
Teacher Portal

Introduction to Python Programming

What is Python Programming?

In order to control your robot, you will be creating projects in Python in VEXcode V5. This is a text-based language and it uses text and special syntax to write the instructions which ultimately tell the robot what to do. If you worked with block-based programming before, such as Block-based VEXcode V5, these text instructions are replacing the blocks.

An instruction is an entire line within the project. The instruction can contain portions of information for the device, the command, the parameters. The image below shows an instruction with each of these portions outlined.

Line of Python code with each term labeled. The highlighted line of code reads Drivetrain drive For (Forward, 200, mm); with Drivetrain labeled as the Device, driveFor labeled as the Command, and (Forward, 200, mm) labeled as the Parameters.

It’s important to remember specific rules for writing instructions in Python in VEXcode V5. For example, capitalization has specific rules within instructions. In Python, devices are written in lowercase letters, and the commands must be in snake case.

It’s also helpful to remember that there is help available within VEXcode V5. Review how to access this help in Python.

Teacher Tips icon Teacher Tips

  • Familiarize yourself with VEXcode V5 Python tutorial articles available, located here
  • Consider reviewing the organization of articles with students if they are not as familiar with coding in Python with VEXcode V5.