Code for Life Community hub
Python DenRapid RouterCode for Life website
  • 💛Welcome
  • 📅Release Notes
  • âĪïļBecome a Contributor
  • ðŸŠīIndustry Experience
  • 🏆Wall of Fame
  • ðŸ“ĶRepositories and Packages
  • ðŸī󠁧ó Ēó Ĩó Ū󠁧ó ŋNational Curriculum alignment
  • ðŸī󠁧ó Ēó ģó Ģó īó ŋNational Curriculum alignment
  • â„đïļGlossary
  • COMMUNICATIONS
    • 📖Publications
  • 🗞ïļNewsletters
    • 🎊Spring 2025
    • 🌷Bett show 2025
    • 🎄December 2024
    • 🍁Autumn 2024
    • ðŸŒŧSummer 2024
    • 🐰Spring 2024
    • ❄ïļWinter 2024
    • 🎄December 2023
    • 🍁Autumn 2023
    • ðŸŒŧSummer 2023
    • 🌷Spring 2023
    • 🎄December 2022
    • 🍁Autumn 2022
    • ðŸŒŧSummer 2022
    • 🌷Spring 2022
    • 🎄December 2021
  • ðŸ§ĐNewsletter challenges
    • ðŸĪ–Ocado Robot Debugging Challenge!
  • ðŸĪ–Books of Robots
  • Community resource hub
    • ðŸ’ŧHow do Computers work?
    • 🔐Safety online: Passwords and Security
    • ðŸĪ–The World of Robotics
    • ðŸĶūCareers in technology
      • 📃Careers posters
      • ðŸ“―ïļCareer based videos
  • ðŸ§ĐBlockly to Python Guide
  • Python Commands
  • 🗚ïļLevel Maps 1‒50
  • 🗚ïļLevel maps 51–67
  • Software Developer Guide
    • ðŸ’ŧDev Environment Setup
    • 🔝Code Promotion Strategy
    • ðŸ’ŋBack End
      • â„đïļOverview
      • ✍ïļCoding Patterns
      • 🧊Testing Strategy
    • ðŸ–ąïļFront End
      • â„đïļOverview
      • ✍ïļCoding Patterns
      • 🧊Testing Strategy
  • Links
    • Code Workspace
    • Visit our Site
  • Rapid Router Repo
Powered by GitBook
LogoLogo

Copyright Ocado Group 2025

On this page
  • Movement
  • Position
  • Animals

Was this helpful?

Export as PDF

Python Commands

Useful Python commands to use in the later levels of Rapid Router

Run the following commands on the van object v, e.g. my_van.move_forwards()

Movement

my_van.move_forwards()
my_van.turn_left()
my_van.turn_right()
my_van.turn_around()
my_van.wait()

Position

my_van.at_dead_end()
my_van.at_destination()
my_van.at_red_traffic_light()
my_van.at_green_traffic_light()
my_van.at_traffic_light(c)
# where c is 'RED' or 'GREEN'
my_van.is_road_forward()
my_van.is_road_left()
my_van.is_road_right()
my_van.is_road(d)
# where d is 'FORWARD', 'LEFT', or 'RIGHT'

Animals

my_van.is_animal_crossing()
my_van.sound_horn()
PreviousBlockly to Python GuideNextLevel Maps 1‒50

Last updated 6 days ago

Was this helpful?