Introduction to programming: Python
This is supplementary material for Prabhas' Section.
Learning programming is like learn to swim. You can not swim by
just listen to a lecture! Go to the pool and enjoy the practice :-)
input from programmers to IDLE is shown in
for c in input
output from IDLE is shown in
to presentation used in the class
week 1 Introduction to Python language
week 2 Simple statements
week 3 Condition and Loop
review of condition and loops
week 4 Strings and Files worksheet
for week 4
week 5 list string
review and simple list and list comprehension
Review Tutorial 1 input4.txt
Tutorial 1 exercise 3, 5, 7
week 7 Aj Somchai Prasitjutrakul (list, tuple dict)
week 9 Function
Function (new slide by Aj.
week 10 Recursion Recursion with List exercise
week 11 Scientific Numerical Package (NumPy) Numpy
lecture (new slide by Aj. Somchai)
How to install NumPy
week 12 Use NumPy: Image processing
example images: democracy
sin plot (sinplot.py)
bar graph (barplot.py)
grayscale image (grayplot.py)
convert to gray (makegrayplot.py)
compress image (compressplot.py)
week 13 Object, Class
The simplest installation is here.
We use Python 3 in the class. You just click the latest download (default
is 32-bit). But if you want 64-bit system, please visit this
page (for windows). Select the "Windows x86-64 web-based
installer" link. Once you install the Python system, the programming
environment application will be available. It is called IDLE.
You can find it in the start menu.
How to install NumPy and matplotlib
Aj Somchai Prasitjutrakul has uploaded his video lecture. You can find
them here. (excellent quality!)
You can write a program and watch how it runs step-by-step, completely with
visualizing values of all variables. (select Python version 3.x)
Here is a tutoring Python website. It is organised by your CP
senior students. You can also find personal tutors there too!
Give it a try. http://www.piles.asia/home/
last update 18 Apr 2016