Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

7/7/2021

Seminar 1:
Introduction &
Programming Basic

AB0403 Decision Making with Programming and Data Analytics

What this course covers?

Programming Connecting Codes to Business Analytics


Data Source

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*.

● Programming Basic ● File input and output ● Descriptive analysis


● Operators and Controls ● Database setup ● Data visualization
● Data Types ● SQL

* 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.

To succeed in this course,


You are expected to...
1. Read and complete pre-lecture materials (reading, video etc).
2. Attend weekly seminar.
3. Participate in in-class activities and exercises.
4. Communicate and solve problems using technology.
5. Bring your own laptop for each seminar.

2
7/7/2021

Course Assessment

This Week’s Learning Objectives


In this lecture, you will learn
● Programming environment
● Programming syntax
● Variables
● Basic data type

3
7/7/2021

What is a computer program?

• Series of statements for computer to execute


• Program allows you to design the way you want computer to do something.
• Program allows us to utilise it to solve problems

First published computer program by Ada Lovelace.


Source: https://en.wikipedia.org/wiki/Ada_Lovelace#First_computer_program
7

Everyone should know how to


program a computer, because it
teaches you how to think!
- Steve Jobs

4
7/7/2021

High Level Language:


The Language - Closer to human language.
- Do not need hardware
knowledge.
- Example: Python, Java,
Visual Basic.

Low level language:


- Machine level language.
- Tie to hardware
architecture.
- Example: VHDL, assembly
language. 9

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

You have learnt...


1. Programming environment is constructed by editor, compiler, and debugger.
2. Program is instruction for computer to execute
3. To define various types of data types.
4. To construct python codes with inputs and outputs

16

You might also like