Screenshot of VEXcode VR interface showcasing a block-based coding environment for programming a virtual robot, designed to facilitate coding education in classrooms and support STEM learning.

VEXcode VR can be used to teach and practice many different math concepts such as order of operations, solving equations, solving right triangles, using the Pythagorean Theorem, categorizing shapes, and many others.


Operator Blocks

Screenshot of VEXcode VR operator blocks interface, showcasing various programming blocks used for coding a virtual robot, highlighting the block-based coding environment designed for educational purposes in STEM learning.

Operator blocks are part of the Operators category in VEXcode VR. These blocks fall under the category of Reporter blocks, so they report values from variables, sensors, or calculations. For more information on Reporter blocks, view the Block Shapes and Meaning article.

Screenshot of VEXcode VR operator blocks interface, showcasing various programming blocks used for coding a virtual robot, highlighting the block-based coding environment designed for educational purposes in STEM learning.

Operator blocks can be used to determine calculations such as: 

  • Basic operations (addition, subtraction, multiplication, division)
  • Rounding
  • Absolute value
  • Trigonometric functions (sine, cosine, tangent, arcsine, arccosine, arctangent)
  • Logarithms
  • Determine inequalities
  • Utilize conjunctions (and), disjunctions (or,) and negations (not) that are used in discrete mathematics.

For more information on the Operator blocks, view the Help information.


Using the Monitor Window and Monitor Console

Screenshot of VEXcode VR interface showing a virtual robot on a monitor, illustrating the block-based coding environment used for teaching coding concepts in classrooms.

The Monitor Window and Monitor Console can be used to display a message, report sensor values, or to collect data, creating user-readable outputs from VEXcode VR projects. This can be helpful when determining mathematical calculations.

For example, in the following project, being able to see the current value of the timer in seconds in the Monitor Window can allow the user to see which of the statements in the disjunction (the Or block) will cause the conditional to be true. Since the VR Robot will reach the wall before the 15 second threshold, the other condition in the Or block that the VR Robot will be less than 50 mm from the wall, will be true.

Illustration of a square drawing tool in VEXcode VR, showcasing the block-based coding interface designed for teaching programming concepts through a virtual robot, suitable for classroom use and STEM education.

The Print Console can also be used to view discrete moments in a project, such as viewing different sides being drawn to categorize shapes or printing calculations.

In the following example, the Monitor Console or the Monitor Window could be used to view which side of the square the VR Robot is actively drawing. This helps the user to better categorize shapes by their number of sides (triangle, quadrilateral, pentagon, hexagon, etc…).


Pythagorean Theorem Example

Illustration of the Pythagorean theorem demonstrating the relationship between the sides of a right triangle, used in VEXcode VR to teach coding concepts and problem-solving in a classroom setting.

In the following example, the VR Robot will solve for the third side of a Pythagorean Triple using the Pythagorean Theorem. The Pythagorean Theorem is used to find a missing side of a right triangle. The formula is the following:

Pythagorean Theorem: a2 + b2 = c2

In this example, the two sides given are 600 and 800 mm. The user is to calculate the third side using blocks from the Operators category. Some known properties of a Pythagorean Triple are that the sides are in a 3:4:5 ratio, and the three interior angle measurements are approximately 90, 36.9, and 53.1 degrees.

The project will use variables and operator blocks to calculate the missing side. The Monitor Console will be used to observe the length of all three sides, once they are calculated. This allows the user to see the value of the third side as it is calculated.

Screenshot of a formula in VEXcode VR, illustrating coding concepts for virtual robots within an educational context, designed to enhance problem-solving and computational thinking skills for students and educators.

Note how the formula is created in the project using the variable and operator blocks:

Diagram illustrating how to turn a virtual robot 143 degrees in VEXcode VR, showcasing the coding interface for programming educational robotics in a classroom setting.

Also note that the robot will have to turn the exterior angle of 143.1 degrees and not the interior angle of 36.9 degrees because of the way that the robot is facing after it draws side B.

Diagram illustrating the geometric properties of a triangle, used in VEXcode VR to teach coding concepts and problem-solving in a classroom setting.

36.9 degrees is the interior angle of the triangle, but the VR Robot will have to turn the value of the exterior angle in order to draw the triangle properly.

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

Last Updated: