- Notifications
You must be signed in to change notification settings - Fork618
A Python 3 programming tutorial for beginners.
License
Akuli/python-tutorial
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a concise Python 3 programming tutorial for people who thinkthat reading is boring. I try to show everything with simple codeexamples; there are no long and complicated explanations with fancywords. If you have never programmed before clickhere to find out what programming islike and get started.
This tutorial is aimed at people with no programming experience at allor very little programming experience. If you have programmed a lot inthe past using some other language you may want to readthe officialtutorial instead.
You can use Python 3.6 or any newer Python with this tutorial.Don'tuse Python 2 because it's no longer supported.
The tutorial consists of two sections:
This section will get you started with using Python and you'll be ableto learn more about whatever you want after studying it.
- What is programming?
- Installing Python
- Getting started with Python
- ThinkPython: The way of the program
- Variables, Booleans and None
- Using functions
- Setting up an editor
- If, else and elif
- Handy stuff with strings
- Lists and tuples
- Loops
- zip and enumerate
- Dictionaries
- Defining functions
- Writing a larger program
- What is true?
- Files
- Modules
- Exceptions
- Classes
- Docstrings
If you want to learn more advanced techniques, you can also read thissection. Most of the techniques explained here are great when you'reworking on a large project, and your code would be really repetitivewithout these things.
You can experiment with these things freely, but pleasedon't use thesetechniques just because you know how to use them. Prefer the simpletechniques from the Basics part instead when possible. Simple is betterthan complex.
- Important:getting help
- Contact me
- Answers for exercises inbasics andadvanced sections
- The TODO list
You can star this tutorial. Starring is free for you, but it tells meand other people that you like this tutorial.
Gohere if you aren't herealready and click the "Star" button in the top right corner. You will beasked to create a GitHub account if you don't already have one.
Gohere if you aren'there already.
Click the big green "Clone or download" button in the top right ofthe page, then click "Download ZIP".
Extract the ZIP and open it. Unfortunately I don't have any morespecific instructions because how exactly this is done depends onwhich operating system you run.
Run
make-html.py
and follow the instructions.
If you have git and you know how to use it, you can also clone therepository instead of downloading a zip and extracting it. An advantagewith doing it this way is that you don't need to download the wholetutorial again to get the latest version of it, all you need to do is topull with git and runmake-html.py
again.
I'm Akuli and I have written most of this tutorial, but other people have helped me with it.Seegithub's contributors page for details.
If you have trouble with this tutorial, pleasetell me about it and I'll make this tutorial better,orask for help online.If you like this tutorial, pleasegive it astar.
You may use this tutorial freely at your own risk. SeeLICENSE.