Tuesday, May 12, 2026
Cohort 3 | Project CloudIgnite Topics: ASCII & Binary, Data Types, Functions, Collections, Static vs Dynamic Typing, Control Flow, Git & GitHub, AWS Cloud9 Duration: ~3 hours
Key Takeaways
- Primitive types:
int,float,complex,bool,str; composite types: combinations of primitives - Collections: list (ordered, mutable), set (unordered, no dupes), dict (key-value pairs), queue (FIFO)
- Static typing (C/Java) vs dynamic typing (Python) — Python allows variable type changes at runtime
- Functions: input → process → output; always returns a single value
- Git vs GitHub: Git = local version control; GitHub = online hosting for Git repos
- AWS Cloud9: browser-based IDE running on EC2; AWS CodeCommit: managed Git repository
- Labs 1–3: Hello World, numeric types, string operations in Cloud9
Table of Contents
- ASCII & Binary Representation
- Data Types – Primitive
- Data Types – Composite
- Functions
- Collections & Data Structures
- Static vs Dynamic Typing
- Control Flow
- Loops
- Python Syntax Rules
- Version Control – Git & GitHub
- AWS Cloud9 IDE
- Lab Work Summary
- AWS CLF-C02 Relevance
1. ASCII & Binary Representation
- Everything in a computer is ultimately 1s and 0s (binary).
- For human readability, binary values are represented as decimal or hexadecimal.
- ASCII is a table that maps characters to numeric values, e.g.:
72→H(uppercase)97→a(lowercase)32→ space
- When you type letters like
ABC, the computer stores them as numbers, which in turn are stored as binary.
Key takeaway: Characters, numbers, and all data are binary under the hood. ASCII is one standard encoding that bridges human-readable text and numeric values.
2. Data Types – Primitive
Primitive (built-in) types are available in all programming languages:
| Type | Description | Example |
|---|---|---|
int | Whole numbers | 1, 42 |
float | Decimal / fractional numbers | 3.14, 2.5 |
complex | Complex numbers (uses j not i) | 5j |
bool | True or False values | True, False |
str | Text / string of characters | "hello" |
Python-specific notes:
- Python is dynamically typed — you don't declare the type, it's inferred at runtime.
- A variable can change type within the same script (not possible in statically typed languages).
- Check a variable's type using:
print(type(my_variable))
3. Data Types – Composite
A composite data type is a combination of multiple primitive types.
Examples:
Person→ hasname(str),age(int),phone(str),email(str)Student→ hasname(str),student_id(int or str),email(str),age(int)Movie→ hasname(str),year(datetime),is_read_only(bool),length(int)
How they're implemented across languages:
| Language | Mechanism |
|---|---|
| Python | class or plain object |
| C | struct |
| C++ / Java | class |
Note: The lecture's focus is basic Python (loops, conditionals, collections) — not Object-Oriented Programming (OOP). OOP with classes is for larger projects.
4. Functions
A function is a black box that takes an input and returns an output.
Input → [ Function ] → Output
What a function can do:
- Perform a task with no return value (e.g., clear a screen, print to terminal)
- Return a single value (e.g., calculate pi)
- Accept multiple input parameters (e.g., latitude, longitude, speed, heading)
- Return a composite data type (e.g., return a
Personobject) - Return a list of composite types (e.g., return a list of
Studentobjects)
Key distinction:
- Function output = the value returned inside your code (via
return) - Printing to terminal is a side effect, not the function's return value
Why Python for AI/ML?
- Easy to learn and write
- Huge ecosystem:
NumPy,TensorFlow,PyTorch,Matplotlib - Those libraries are written in C/C++ under the hood for performance — Python gives you easy access to powerful, fast tools
- Python itself is slower than C/C++/Java, but leverages compiled libraries
5. Collections & Data Structures
| Structure | Description | Python Name |
|---|---|---|
| Array | Fixed size, fixed data type | (rarely used directly) |
| List | Ordered, mutable, allows mixed types, allows duplicates | list |
| Set | Unordered, no duplicate values | set |
| Queue | First-In-First-Out (FIFO) | queue |
| Deque | Double-ended queue (add/remove from both ends) | deque |
| Dictionary | Key-value pairs (hash map) | dict |
Python list example:
my_list = [1, 2, 3, 10.5, "hello"] # mixed types allowed
print(my_list)
Set removes duplicates:
my_set = {1, 2, 2, 3} # stores {1, 2, 3}
Dictionary (same as HashMap in Java):
student = {"name": "Ali", "id": 1001}
In Python, values in a list can be different types. In statically typed languages (e.g., Java, C++), array values must be the same type.
6. Static vs Dynamic Typing
| Feature | Static Typing (C, C++, Java) | Dynamic Typing (Python, JavaScript) |
|---|---|---|
| Declare type explicitly? | ✅ Required | ❌ Not required |
| Type can change at runtime? | ❌ No | ✅ Yes |
| Example declaration | string name = "Alice"; | name = "Alice" |
| Change type later? | ❌ Syntax error | ✅ name = 123 is valid |
Python example:
name = "Alice" # type is str
name = 123 # now type is int — valid in Python
C++ equivalent (static):
string name = "Alice";
// int name = 123; ← this would be a syntax error
7. Control Flow
Control flow determines which code path to execute based on conditions.
if / elif / else
if guess > number:
print("Too high")
elif guess < number:
print("Too low")
else:
print("Correct!")
Calculating bonus example:
if name == "Juven":
bonus = 30
else:
bonus = salary * 0.1
Switch / Match (less common in Python)
- Similar to chained
if-elif-else - Less frequently used, but exists for cleaner syntax in some cases
8. Loops
Use loops when you need to repeat a task over a collection or condition.
employees = ["Alice", "Bob", "Charlie"]
for employee in employees:
# capitalize names, calculate bonus, etc.
print(employee.upper())
- Loops allow processing hundreds/thousands of items without writing repetitive code.
- Python loops use indentation to define the loop body (see Python Syntax Rules below).
9. Python Syntax Rules
⚠️ Critical: Python uses indentation (whitespace) to define code blocks — this is NOT optional.
for item in my_list:
print(item) # ← must be indented (4 spaces or 1 tab)
print("done") # ← NOT inside the loop
- If indentation is wrong → SyntaxError
- Standard: 4 spaces or 1 tab per level
- Use
#for comments:# This is a comment - Use
Ctrl + /in VS Code / Cloud9 to toggle comment on selected lines
String operations:
# Concatenation
first = "Water"
second = "fall"
result = first + second # "Waterfall"
# Must be same type — this will error:
# result = 123 + "abc"
# Convert int to str first:
result = str(123) + "abc" # "123abc"
# f-string (formatted string):
age = 25
print(f"Age is {age}")
10. Version Control – Git & GitHub
| Tool | Purpose |
|---|---|
| Git | Local version control tool — tracks changes on your machine |
| GitHub | Online hosting platform for Git repositories |
Why use version control?
- Track changes over time (know what changed and when)
- Identify which version introduced a bug
- Roll back to a previous working version with a single command
- Collaborate with others on the same codebase
Key Git concepts:
| Concept | Meaning |
|---|---|
| Repository (repo) | A folder tracked by Git |
| Commit | A saved snapshot/version of your code |
| Clone | Copy a remote repo to your local machine |
| Branch | A separate line of development |
| Merge | Combine changes from two branches |
| Merge conflict | When two branches have conflicting changes |
Git vs GitHub: Git is the tool; GitHub is where you store your Git repository online. You can use Git locally without GitHub.
Git Bash was already installed by participants in a previous session.
11. AWS Cloud9 IDE
AWS Cloud9 is a cloud-based Integrated Development Environment (IDE) accessible from a browser.
Key Features:
- Full IDE in the browser (text editor + debugger + terminal)
- Runs on Linux (connected to an EC2 instance)
- Integrated Linux terminal — gives direct access to your EC2 instance
- Code is saved automatically across sessions (no submit button needed)
- Can run Python code via the Run button or via terminal:
python3 filename.py
Cloud9 vs VS Code:
| Feature | Cloud9 | VS Code |
|---|---|---|
| Type | Full IDE | Text Editor (with extensions) |
| Environment | Browser / Online | Local / Desktop |
| Terminal | Linux (EC2) | Local OS |
| Purpose (in course) | Running AWS labs | Local practice |
AWS CodeCommit:
- Cloud9 integrates with AWS CodeCommit — AWS's own version control service (similar to GitHub, but within AWS).
Practical tips from the lab:
- If the terminal becomes unresponsive → close it and open a new terminal window
- Gray dot on tab = unsaved file → press
Ctrl+Sto save - File names are case-sensitive —
Lab2.py≠lab2.py - Run code from terminal:
python3 lab2.py - Create new files via terminal:
touch lab2.py - Rename files:
mv oldname.py newname.py - Comment/uncomment selected code:
Ctrl + /
12. Lab Work Summary
Lab 1 – Introduction to Cloud9
- Set up AWS Cloud9 environment
- Wrote and ran first Python script:
print("Hello World") - Explored the Cloud9 interface
Lab 2 – Numeric Data Types
- Exercise 1: Integer (
int) —type(),str()conversion - Exercise 2: Float (
float) — string concatenation withstr(), f-strings - Exercise 3: Float continued — commenting out code with
Ctrl+/ - Exercise 4: Complex numbers (
complex) — usesjinstead ofi - Exercise 5: Boolean (
bool) —True/False, reusing variable names
Lab 3 – String Data Types (started)
- Exercise 1: String type —
type()on a string variable - Exercise 2: String concatenation — joining strings with
+ - Exercises 3 & 4 carried over to next session
Lab 6 (CHOOR SAI KAN) – CSV Handling
- Encountered import error for
csvmodule - Fix:
pip3 install python-csv copymodule worked without additional installation
AWS CLF-C02 Exam Relevance
The following topics discussed in this lecture are directly or indirectly relevant to the AWS Certified Cloud Practitioner (CLF-C02) exam:
✅ Directly Relevant
| Topic | CLF-C02 Domain | Notes |
|---|---|---|
| AWS Cloud9 | Domain 3: Cloud Technology & Services | Cloud9 is an AWS managed IDE service — knowing it's a browser-based IDE on EC2 is testable |
| Amazon EC2 | Domain 3: Cloud Technology & Services | Cloud9 connects to an EC2 instance; EC2 is a core AWS compute service |
| AWS CodeCommit | Domain 3: Cloud Technology & Services | AWS's managed source control service (Git-compatible) — listed as an AWS Developer Tool |
⚠️ Foundational / Indirectly Relevant
| Topic | Notes |
|---|---|
| Version Control concepts | Underpins understanding of AWS CodeCommit and DevOps services like AWS CodePipeline |
| Cloud-based IDE concepts | Helps understand the broader category of AWS Developer Tools |
| Linux terminal basics | Relevant for working with EC2 instances and AWS CLI |
❌ Not Directly Tested in CLF-C02
| Topic | Notes |
|---|---|
| Python syntax, data types, functions | Programming knowledge is not tested in CLF-C02 |
Git commands (clone, commit, etc.) | Operational detail — not in scope for CLF-C02 |
| ASCII / binary representation | Computer science fundamentals, not AWS-specific |
Study tip for CLF-C02: Focus on what AWS Cloud9 is (cloud IDE, runs on EC2, browser-based), what AWS CodeCommit is (managed Git repository), and where they fit in the AWS Developer Tools category. The CLF-C02 exam tests service awareness and use cases, not configuration details.
Notes compiled from lecture – May 12, 2026
AWS re/Start Program | Cohort 3: Project CloudIgnite