Topic 4: three control flow statements a programmer must know.
First, we need to know the structure of a compound statement!
A compound statement consists of one or more clauses.
What are clauses?
A clause consists a header and a suite.
Each clause header begins with a uniquely identifying keywords (like if, while, for…) and end with a
: (colon). The suite is executed if the expression of the header is true.
Now let’s dig into the must-known control flow statements!
1. if statement
if...elif...else statement is used for conditional execution. There can be zero or more
Topic 3: two data types — sequence & set
In this topic, you will learn sequence data types and set data type, all being used to store items!
Besides numbers, Python can also manipulate strings in several ways. Strings can be enclosed in single quotes (
'...') or double quotes (
"...") with the same result.
Strings can be glued together with the
+ operator, and repeated with
Topic 2: three data types — Dictionary, Numeric and Boolean
Learning through topic 1, we know how to use Python as a calculator and to assign variables. Now let’s dig into built-in data types in Python!
In topic 2, we introduce three data types: Dictionary, Numeric and Boolean
1. Integer (int)
Int contains positive or negative whole number.
Float contains real numbers with decimal point.
Complex contains (real number) + (imagine number)
Topic 1: Let’s turn complex financial numbers into easy codes and graphs!
1. Using Python as a calculator
Finance + Data Science