Code for Life
Search…
Code for Life
🛠Developer Guide
Contributing as Developer
Getting Started
Development Guidelines
Submitting Your Work
About
Team and Contributors
Release Notes
Git Repositories
Common Setup
Kurono (aimmo) Setup
Testing
Common Issues
Rapid Router
Blockly Guide
Python Guide
Python Commands
Glossary of Computing Terms
Powered By
GitBook
Python Commands
Useful Python commands to use at the latter levels of Rapid Router
Run the following commands on the van object v, e.g.
my_van.move_forwards()
Movement
1
my_van
.
move_forwards
()
2
my_van
.
turn_left
()
3
my_van
.
turn_right
()
4
my_van
.
turn_around
()
5
my_van
.
wait
()
Copied!
Position
1
my_van
.
at_dead_end
()
2
my_van
.
at_destination
()
3
my_van
.
at_red_traffic_light
()
4
my_van
.
at_green_traffic_light
()
5
my_van
.
at_traffic_light
(
c
)
6
# where c is 'RED' or 'GREEN'
Copied!
1
my_van
.
is_road_forward
()
2
my_van
.
is_road_left
()
3
my_van
.
is_road_right
()
4
my_van
.
is_road
(
d
)
5
# where d is 'FORWARD', 'LEFT', or 'RIGHT'
Copied!
Rapid Router - Previous
Python Guide
Next - Rapid Router
Glossary of Computing Terms
Last modified
2mo ago
Export as PDF
Copy link
Contents
Movement
Position