Console#
Introduction#
All Console methods will appear in the VEX AIR Drone Controller’s Mission Logs. These methods allow you to display text, receive input, and format printed data in real time.
Below is a list of the available methods for interacting with the console:
Actions – Output text or clear the console.
print – Outputs text to the Mission Logs.
clear_console – Clears all text from the Mission Logs.
Getter – Read user input.
input – Returns the most recent user input as a string.
Mutator – Format printed text.
set_console_text_color – Sets the color for all subsequent console text.
Actions#
print#
print
outputs text to the controller’s Mission Logs. Each use of print
moves the cursor to the next line by default.
Usage:
print(string, end)
Parameter |
Description |
---|---|
|
The text that will be printed as a string. |
|
Optional. The string added to the end of the printed text. Specified as |
# Display two messages consecutively
print("I'm printed on one line.")
print("I'm printed automatically on the next line!")
# Print three colors on one line in the Mission Logs
colors = ["Red", "Green", "Blue"]
for color in colors:
print(color, end=", ")