Posts

Day 6 – Lists, Tuples, and Basic Operations

Image
  📋 Day 6 – Lists, Tuples, and Basic Operations 1. Learning Objectives By the end of Day 6, you will be able to: Create and manipulate lists to store ordered collections of AEC data (e.g., column loads, beam spans, coordinates). Access, modify, and slice list elements using indexing. Use common list methods ( append , remove , sort , index , etc.). Understand tuples as immutable sequences and know when to use them (e.g., storing a point (x, y, z) ). Apply lists and tuples to practical AEC tasks: storing material properties, iterating over a nested list of coordinates. 2. Concept Explanation 2.1 Lists A list is an ordered, mutable collection of items. Items can be of any data type (numbers, strings, other lists). # Creating lists beam_spans = [6.0, 4.5, 7.2, 5.0] # list of floats column_loads = [850, 920, 780, 1100] # list of ints floor_names = ["Lobby", "Office", "MEP"] # list of strings mixed = [1, "hello", ...

Day 5 – Functions, Scope, and Docstrings

Image
 🧰 Day 5 – Functions, Scope, and Docstrings 1. Learning Objectives By the end of Day 5, you will be able to: Define reusable functions with def to encapsulate engineering calculations. Understand the difference between local and global variable scope. Write docstrings to document what a function does (its purpose, parameters, and return value). Build a small library of AEC‑focused functions (moment of inertia, section modulus, U‑value check). Call functions with arguments and use return values in larger scripts. 2. Concept Explanation 2.1 Why Functions? Functions let you package a block of code that performs a specific task. You can then call it many times with different inputs. In AEC: Instead of rewriting the same formula for every beam, you write a function once. Functions make your code organised , testable , and reusable . You can share your library of design functions with colleagues. 2.2 Defining and Calling Functions def function_name(parameter1, par...

Day 4 – Loops & Flow Control (for, while, break, continue)

Image
  🔁 Day 4 – Loops & Flow Control (for, while, break, continue) 1. Learning Objectives By the end of Day 4, you will be able to: Use for loops to iterate over a sequence (list, range, string). Use while loops to repeat until a condition changes. Control loop execution with break (exit early) and continue (skip to next iteration). Apply loops to real AEC tasks: summing loads, generating floor levels, automating repeated checks. 2. Concept Explanation 2.1 The for Loop The for loop iterates over each item in a sequence (list, tuple, string, or range ). for variable in sequence: # code to run for each item AEC examples of sequences you’ll loop over: A list of storey heights A range of floor numbers A list of beam spans A string of a project code range() function range(start, stop, step) generates a sequence of integers. Call Produces range(5) 0, 1, 2, 3, 4 range(1, 5) 1, 2, 3, 4 range(1, 10, 2) 1, 3, 5, 7, 9 Used often to loop a fixed numbe...

Day 3 – Conditional Statements & Boolean Logic

Image
 🧩 Day 3 – Conditional Statements & Boolean Logic 1. Learning Objectives By the end of Day 3, you will be able to: Write if , elif , and else statements to make decisions. Combine conditions using and , or , and not . Use comparison operators ( == , != , < , > , <= , >= ) in design rules. Check multiple design criteria (e.g., code compliance) in one script. Avoid common pitfalls like indentation errors and comparing different types. 2. Concept Explanation 2.1 if / elif / else The structure is: if condition1: # code executed if condition1 is True elif condition2: # code executed if condition1 is False and condition2 is True else: # code executed if all above conditions are False elif is short for else if . You can have zero or more elif clauses, and the else is optional. Indentation (4 spaces) is crucial – it defines the block. 2.2 Boolean Logic Operators Operator Meaning AEC Example and both True if depth > 200 and dep...

Day 2 – Operators, Input/Output, and Type Castin

Image
 📐 Day 2 – Operators, Input/Output, and Type Casting 1. Learning Objectives By the end of Day 2, you will be able to: Use arithmetic operators ( + , - , * , / , // , % , ** ) in engineering calculations. Use comparison operators ( == , != , < , > , <= , >= ) to check design rules. Get user input with input() (e.g., beam span, column load). Convert between data types (type casting) to avoid common errors. Write small interactive scripts for quick AEC checks. 2. Concept Explanation 2.1 Arithmetic Operators Operator Name AEC Example + Addition total_length = span1 + span2 - Subtraction remaining_stock = stock - used * Multiplication area = length * width / Division stress = force / area // Floor division beams_needed = total_length // stock_length % Modulus waste = total_length % stock_length ** Exponentiation moment_of_inertia = b * h**3 / 12 Important for AEC: / always returns a float (e.g., 7 / 2 = 3.5 ). // returns an integer (floor) – usef...

Day 1 – Python Foundations for AEC Professionals

Image
    📐 Day 1 – Python Foundations for AEC Professionals 1. Learning Objectives By the end of Day 1, you will be able to: - Understand what Python is and why it’s used in architecture, engineering, and construction (AEC). - Install Python and set up a coding environment (VS Code or Jupyter). - Write your first Python script. - Use variables to store real‑world AEC data (room dimensions, material costs, etc.). - Work with basic data types: integers, floats, strings, booleans. - Perform simple arithmetic and string operations relevant to building design. 2. Concept Explanation 2.1 What is Python? Python is a high‑level, interpreted programming language known for its readability and vast ecosystem of libraries.     In the AEC world, Python is used to automate design calculations, generate parametric geometry, analyse structural systems, process BIM data (IFC), and script CAD/BIM tools (Rhino, Revit, Dynamo, Blender). Key benefits for AEC professionals: Rapid protot...
EARN AT THE COMFORT OF YOUR HOME

Sponsored content