ThinkPython is a free Python book. Its first chapter is about programming in general. Read it here. Read the glossary also, but don't study it too much. Some things in it are useful to know, but I think studying it carefully would be really boring.
When you're done reading, read the summary and make sure you've learned everything.
- Now you should have some kind of idea about what programming is.
- Each value has a type, and you can find that out with
type(value). For example, writingtype(123)to the Python prompt does the same thing as writingintto the prompt. - Types and classes are the same thing (in Python 3).
- Some of the most commonly used types are:
- int is short for integer.
1and2are ints. - float is short for floating point number.
1.0and3.14are floats. - str is short for string.
"hello"and'hello'are strings. It doesn't matter if you use 'single quotes' or "double quotes", they do the same thing in Python.
- int is short for integer.
You may use this tutorial freely at your own risk. See LICENSE.