Professional Documents
Culture Documents
By Victor K Miclovich
Research scientist, AlViHe 1
A taste of what programmers do
• Website development
• Database management systems
• Artificial intelligence
• Game development
• Security (crypto)
• Information systems (e-commerce, e-business, e-
banking, etc.)
• Software application development
• Systems development and design
2
Places to work
• IS giants:
– Google, Yahoo, MSN, etc.
• Software development
– As a freelance developer
– Contract developer
• Microsoft, Open source (Linux), etc.
• World wide opportunities in research b’se the
world is a global village and work can be got easily
3
IS – Information Systems
• A way in which information can be stored,
organized, and distributed to effect
management decisions at an organization
– You could design search engines, effective
websites, good databases, etc.
4
Freelance developer
5
Website development
• Use of open source to develop websites (the
world economy is becoming even more
electronic as each day passes)
– Be able to work with primitive languages like
HTML and XML; others like MySQL, Python, Perl,
Jscript, PHP, and many others
– Its quite an exciting experience
6
Artificial intelligence/intelligent
systems
• To develop systems with very enhanced features to boost
productivity of applications and hardware (machines like
robots, factory expert systems)
7
Game devl’pt
• Design of both 2-D and 3-D games for devices
like play station, Xbox, slotting machines, etc
• Computer graphics
8
Crypto or security
• Should be able to design safe applications
aware from cyber-criminals like crackers
9
Job opportunities
• The list is endless, but the previous slides are
just to show you just the tip of the ice-berg,
there are a vast number of things a computer
scientist (a.k.a programmer) can do; so
specialize to avoid a PHD (Permanent H***
D****e)
10
Class details
• This is a fully practical course
– Entails a lot of programming work
– Personal reading, advisable!!!
– Extensive research and comparison with other
languages
• Over 20 lectures + assignments; this is an
easy class, so no worries!!
11
Goal
Use Python to create something useful
Examples:
• Simulate a natural/engineering process
• Manipulate files/PDFs
• Draw pretty graphics
• And many more…
12
Why Python?
• Simpler syntax for beginning programmers
• A growing interest and support community
• Many online publications and support
• Is supported by many platforms: Mac OS,
Windows™, Linux, Solaris…
• It is interoperable
• Has an extensive library
• It is a very powerful language
13
14
Some subtle differences
• A comparison with C and Java
– The hello world program
Description:
It prints out a string of characters: “Hello
world”
15
Hello.c
#include <stdio.h>
int main ()
{
printf(“hello world \n”);
}
16
Hello.py
17
Hello.java
class Hello{
public static void main(String[] args){
//Program executions starts here
System.out.println(“Hello world.”);
}
}
18
What the previous slides show?
• The degree of complexity in writing just a
simple program
19
20
Intro begins now!!! ☺
21
The two languages
• Natural languages
• Formal languages
22
Natural languages
• Simply stated; these are languages used by
human beings in their daily interactions
Examples:
English, Luganda, French, Swahili, etc.
23
Formal languages
• Languages that are made up in order to abstract or mimic a natural
process or even an engineering process.
Examples include:
From Chemistry: CO2, H2O… chemists tend to understand that
π
∫
2
1 tan x
From Math: ∫ sin (x + cos x ),
2 π
, etc.
0
4
24
Characteristics of programming languages
25
syntax
• Refers to the grammatical rules of a programming
language such when to start a statement (similar to
sentence in natural languages)
26
semantics
• This refers to the meaning (mostly logical) of a
program when it is written
27
Types of high-level programming
languages
• Interpreted
• compiled
28
Interpreted languages
• Read (and translates) lines of code while simultaneously executing
code (or instructions)
• The written code (by programmer) is called the source code
• The result (after running program) is called the output
Figure 1.0
29
Compiled languages
• A compiled language translates all the source code (at once) into an
executable code (also called object code) which can be executed at a
later time
Figure 1.1
30
Then what is python?
• Python is an interpreted object-oriented
programming language
31
Other salient features of Python™
• Python has got two modes of operation:
– Script mode
– Normal/interactive mode
32
Interactive mode
The interactive mode is
shown in figure 1.2
defined by the symbol
>>>
Figure 1.2
33
Script mode
The script mode produces a clean
work space with no interactive
capabilities; so you won’t see the
output or result of your program
unless you save it as a *.py file and
run it (F5)
Figure 1.3
34
What is programming?
• Programming is merely giving a computer instructions
35
Approaches used in programming
• Top-down approach:
– You understand what the program is supposed to do; its application
– You formulate a plan
– Gather requirements such as the input variables/values
– And what the program should give as an output when fed certain
input
– Next step usually involves splitting a large task into smaller tasks that
can easily be managed: this is the essence of an OOP
36
Your first program
37
In the Interactive mode
38
Type your program;
Saving
print “hello world”
the
program
Type
file
name
39
Step before the final step
Running the
program!
40
Results!!!!
41
What Next?
42
References:
http://www.python.org
Assignment:
Read from chapters 1 to 4
Next lecture briefly covers detail of these chapters
43