ITE3711 - Lecture1.1 - Introduction To Python and Program Development - 20230822
ITE3711 - Lecture1.1 - Introduction To Python and Program Development - 20230822
Part 1 :
Introduction to Python & Program
Development
• Mathematics
• System scripting
• Software Development
• Web Development
• Etc.
2
Lecture 1 – Part 1
Why Python?
3
Lecture 1 – Part 1
Python website
http://www.python.org/
4
Lecture 1 – Part 1
5
Lecture 1 – Part 1
python --version
Python 3.9.2
6
Lecture 1 – Part 1
Support
• Windows
• MacOS
• Other platforms such as iOS
7
Lecture 1 – Part 1
Before clicking the “Install Now” button, make sure that the checkbox “Add python.exe to PATH” is checked!
8
Lecture 1 – Part 1
Code editor
• Visual Studio Code (link: https://code.visualstudio.com/)
• Notepad ++
• Etc.
9
Lecture 1 – Part 1
Online simulator
• Sandbox (link: https://edube.org/sandbox)
• Etc.
10
Windows tool
• Notepad
Online IDE
• Replit
• Etc.
11
Lecture 1 – Part 1
Computer System
Software
Set of instructions for the computer to process data
System software
• Windows 8
Hardware Software • Windows 10
• Windows 11
Application software
• Google Chrome
• Microsoft Edge 12
Lecture 1 – Part 1
Operating
System
System
software Software refers to a collection of instructions for the
System
Support computer to follow and execute
Computer
Software
General The computer only follows that the programmer tells it to do
purposes (source code)
Application
software
Specific
purposes
13
Lecture 1 – Part 1
Software development
Stage 1 Planning
Programming
Stage 4 Implementation Testing
Installation
Stage 5 Maintenance
14
Lecture 1 – Part 1
Stage 1 Planning
Programmer view:
In the view of the programmer: Output Input Processing
• Determine Output – Response the processed information onto various output devices, such as screen
• Identify Input(s) – Get information (data) from various input devices, such as keyboard
• Determine necessary process to turn given Input(s) into desired Output
15
Lecture 1 – Part 1
• Flowchart
Graphically depict the logical steps to carry out a task and show how the steps relate to each other
• Pseudo code
Uses English like phrases with some program terms to outline the task
16
Lecture 1 – Part 1
Flowchart
• Graphically depict the logical steps to carry out a task and show how the steps relate to each other
• Symbols of flowchart
• Input: Data
• Process: Task, operation
• Decision: Yes, No
• Terminal: Start, End
• Flow line
17
Lecture 1 – Part 1
• Input: radius
Ask the user for the radius
• Process: area = pi * radius squared
Convert the input to a number and stored in the variable
Calculate the area by multiplying PI by the radius squared
• Output: area
Return and display the answer (area) to user 18
Lecture 1 – Part 1
1. Declare variable(s)
Declare variable(s)
2. Store the user input to the variable(s)
3. Convert the input to a number Store the user input to the variable(s)
4. Calculate the area by using the formula Calculate the area by using the formula:
area = pi * radius squared
area = pi * radius squared
5. Return and display the answer (area) of the circle Return and display the answer (area) of
the circle
19
End/Stop
Lecture 1 – Part 1
Programming
Stage 4 Implementation Testing
Installation
Steps in implementation:
Step 1 Create the source file (Rename and save the file)
Step 2 Enter source code(s)
Step 3 Save the changes (Save the changes regularly)
Step 4 Test and review the program
Step 5 Debug (if need)
20
Lecture 1 – Part 1
Step 1 Create the source file (Rename and save the file)
1
3
5
2
21
Lecture 1 – Part 1
22
Lecture 1 – Part 1
23
Lecture 1 – Part 1
9
Result
24
Lecture 1 – Part 1
25