Professional Documents
Culture Documents
Civil Engineers
Lecture 3
by
Dr. Emre Erkmen, P.Eng.
Office: EV 6.209
Phone:514 848 2424
Email: emre.erkmen@Concordia.ca
Lecture hours: Mondays 13:15-16:00
Office hours: Tuesdays 10:00-11:00
1
Structured Programming - Lecture 3
- Customized Plots
- Selection Statements
Structured Programming - Lecture 3
3
Structured Programming - Lecture 3
Input/Output
In many cases, input to a script will come from a data file that has been created by
another source. Also, it is useful to be able to store output in an external file that
can be manipulated and/or printed later.
4
Structured Programming - Lecture 3
Write
Append
5
Structured Programming - Lecture 3
Read data
6
Structured Programming - Lecture 3
7
Structured Programming - Lecture 3
8
Structured Programming - Lecture 3
9
Structured Programming - Lecture 3
Calling a function
11
Structured Programming - Lecture 3
12
Structured Programming - Lecture 3
13
Structured Programming - Lecture 3
14
Structured Programming - Lecture 3
Additional notes
15
Structured Programming - Lecture 3
Programming Guidelines
16
Structured Programming - Lecture 3
Selection statements
• In the scripts and functions we’ve seen thus far every statement was executed
in sequence. This is not always desirable.
17
Structured Programming - Lecture 3
18
Structured Programming - Lecture 3
19
Structured Programming - Lecture 3
20
Structured Programming - Lecture 3
21
Structured Programming - Lecture 3
22
Structured Programming - Lecture 3
23