Introduction to Python
Contents
How to install Python on Linux
How to run a Python program
The basic of Python codes
Data expressions
Built-in functions in Python
Interactive input/output
Conditional statement for Python
Loop structure for Python
Creating your own functions
Python modules
Reading/writing files for Python
Error handling code
Object Oriented Programming (OOP)
Tkinter package for GNU programming
How to run a Python program
There are particular rules for Python codes:
The extensioin of python file is py. (e.g. hello.py)
On the terminal, go to the directory that the file exists. Type "python hello.py". The program will be run as it is ordered.
Python can be started up first by typing python on the terminal. Then, write commands and press enter to run.
When unicode is used, type '# coding: UTF-8' in the first place.
Like C, the commands and names used in Python are case sensitive.
Unlike C, Python does not use semicolon at the end of a command. The indent is more meaningful for the code structure.
Back to Electronics Page
Back to Hiro's Physics Main