View
195
Download
5
Category
Preview:
Citation preview
A GLANCE AT COMPUTER PROGRAMMING
REX JUNSHU WANG @ GIE8 23RD OCTOBER 2015 @ AUT
What is computer programming?
Human write code, which is commonly plain text, in programming language; and compile the code to binary format (sometimes); and finally execute it.
CODE:in plain textwritten by human (commonly)read and unstood by
computer
What is a programming language?
Human communicate with human in human languages, which include English, Chinese, Arabic, Maori, and many others.
Human teach computers how to work in programming languages, which include C, C++, C#, Java, Python, R, Go, and mand others.
Python
a programming language
don’t need the process of compile write in plain text and then execute
If you are using a MacBook (Pro/Air), you can start to practice, now!
Let’s play: “Hello, world” Download “Sublime Text 2” from
http://www.sublimetext.com
Install and open it
Input text like this
Save as “helloworld.py” into your home folder
Open “Terminal”
Execute the code
Branch: if … else ...
In Sublime, create a new file save as “randominteger.py” Input code like this:
In Terminal, execute it
Every time it executes, a random integer between 0 and 20 will be generated
Then logic will go into different branch
Loop: draw a triangle
In Sublime, create a new file Save as “drawtriangle.py” Input code like this:
In Terminal, execute it
More about Python
Python is basicly everywhere.
Python can be used for: Website server Scientific computing Handy tools Many others ….
Who use Python?
More about “Hello, world”
“Hello world” is the most simple computer programme.
Learning of a new programming language typically begins with the “Hello, world” programme in it. YOU JUST BEGAN!
If you want learn more about python: www.python.org
HAPPY JOURNEY
Interesting: Programming Language Logos
Q & A
THANKS
Recommended