Skip to content

usydroboticsclub/python

Repository files navigation

usrc's python tutorial (the best one)

What is python?

Python is a programming language. You write code files, and then you can run the code files, and they'll do what you told them to do. This tutorial will teach you how to use python in a variety of situations. If this is your first programming language, hopefully this is a gateway to a new way of understanding the world!

What makes this python tutorial better than the ones on the web?

  • Other python tutorials drip feed you bits and pieces of python. We give you all the files you need, transparently.
  • Other python tutorials run on web IDEs - ours is designed to run on your machine, so you're not left wondering how end to end python programs work.
  • Other python tutorials split code and theory. We put the theory in the code, so you can see exactly what's going on.

Two ways to play: Install or Interpret

There are two ways to approach this tutorial set. If you have time, we recommend installing python on your own computer - if you're really pressed for time, you can use an online interpeter.

Installing python on your computer

  1. Go to the python website: https://www.python.org/downloads/
  2. Follow the python install instructions. If you are asked whether to "Add Python to PATH", press Yes or check the checkbox.
  3. Copy this set of code files, by pressing the green button on the upper right ("CODE") and download this code as a zip file. (Or, if you know how to use git, you can use that too.)
  4. Download an editing tool e.g. visual studio code (https://code.visualstudio.com/). This will highlight the code and make it so much easier to read.
  5. Open each file with your editing tool (use right click->open with or otherwise).
  6. Read each file and the included comments. When you're ready to run your program:
    1. [WINDOWS] Open a console window by pressing shift+right click in the file explorer where the code file is located.
    2. Press Open Powershell Window Here
    3. In the blue window that pops up, type in python the_code_file.py, then press enter.

Using an interpreter

Alternatively, if you don't have much room on your computer, you can use an online python environment. We recommend https://repl.it/languages/python3. Then, instead of downloading the files here, you can open each file, copy the entire contents of the file into the window on the left, and press the run button when you're ready.

Alright, time to get started! You can get started from 1_helloworld.py, or jump to any topic if you're already familiar with the basics.

If you have any edits to suggest, please raise an issue on github, or [email protected] :)

About

A python tutorial to get you comfortable with python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages