Skip to content

Learning Python

Python is an interpreted high-level programming language for general-purpose programming. First released in 1991, Python has a design philosophy that emphasises code readability, notably using significant whitespace.

There are many resources online for learning Python, here are a few good ones that we would recommend:

  • Student Robotics’ tutorial has a tutorial called Python: a whirlwind tour. This was written for Student Robotics competitors (a similar competition to the one you are taking part in), and explains the basics while trying not to overwhelm you.
  • CSNewbs has a very comprehensive tutorial, that takes you through from the basics to the slightly more advanced. The later chapters cover things like File Handling and UIs - you shouldn’t be using these on your brains, but go wild on your own devices!
  • The Official Python Tutorial can be pretty handy - the good stuff starts at chapter 3, but you should at least skim the stuff before it; there is a lot there and it may be a little overwhelming.
  • A number of tutorials for beginners are linked to from here.
  • Learn X in Y minutes is quite nice if you’ve programmed before in another language and just want to learn the syntax. (Tip: If you’re trying to complete the challenges, here’s where we say you can learn Python in “Y” minutes)
  • The Official Docs can be handy, but a little dense! Give them a shot, but don’t worry if you can’t find what you are looking for.

Running code on your brain may have unintended side effects if it does not call import robot, and doesn’t create a robot object (R = robot.Robot()). Its best to leave those lines in, even if you don’t need to run anything related to the hardware on the brain.