Professional Documents
Culture Documents
S01 - Slides - Programming Basic
S01 - Slides - Programming Basic
Seminar 1:
Introduction &
Programming Basic
Sequence of instructions to be executed by Connect codes to external data sources. Skills, technologies, practices for
compilers or interpreters and convert to File input and output operation. Connect to continuous iterative exploration and
binary codes understandable by computer. database. Connect to network connection. investigation of past business performance
to gain insight and drive business
planning*.
* Beller, Michael J.; Alan Barnett (2009-06-18). "Next Generation Business Analytics". Lightship Partners LLC. Retrieved 2009-06-20.
2
1
7/7/2021
Course Objectives
By the end of this course, you will be able to:
1. Interpret different elements of programming components like programming
syntax, control structures, data types and design methods.
2. Write codes that allow you to solve simple business problem
programmatically.
3. Derive analytics outcome from managing data.
4. Present data graphically that aid and support decision with appropriate
statistical and graphing modules or use visualization software.
2
7/7/2021
Course Assessment
3
7/7/2021
4
7/7/2021
Why Python?
https://spectrum.ieee.org/at-work/innovation/the-2018-top-programming-languages
10
5
7/7/2021
Programming
● A program is a list of statements.
● Statement contains definition, assignment, expression.
● Elements of programming:
○ Variables
○ Controls
○ Functions
11
Variable
● Define:
○ postcode = 801244
○ postcode_str = “801244”
○ postcode_valid = True
○ postcodes = [“801244”, “801223”, “801254”]
● Use:
○ print(postcode)
○ print(“My postal code is “, postcode)
○ postcode = postcode + 100000
○ print(“The first postal code is “, postcodes[0])
12
6
7/7/2021
Data Types
● Types: ● Examples:
○ Numeric (integer, float) ○ x = 1 y = 1.02
○ String ○ y_string = “1.02”
○ Boolean (True / False) ○ valid = True
○ List ○ postcodes = [“801244”, “801223”, “801254”]
○ Tuple ○ subsidiaries = (“breadtalk”, “foodrepublic”)
○ Dictionary ○ ages = {“Jane”: 16, “tom”: 20}
13
Type conversion
● Convert to integer:
○ newpostcode = int(postcode_str)
● Convert to float:
○ tax_rate = float(“5.12”)
● Convert to string:
○ newpostcode = str(postcode)
● Convert to list:
○ names= list(name)
14
7
7/7/2021
Getting input
● input:
○ name = input(“Name please?”)
○ age = int(input(“Your age?”)
15
16