This chapter establishes the core concepts of programming within Dynamo for Revit, guiding students through the essential logic behind computational design. By completing it, students gain the ability to understand how Dynamo executes step-by-step instructions, work confidently with data types such as numbers, strings

💡 Goal: Confirm understanding of arithmetic operators.
Using two numbers (8 and 3), calculate the results of subtraction, multiplication, and division.
Subtract → 5
Multiply → 24
Divide → 2.67
Tags: #numbers #math #operators
Related Lessons:
#CH1_L4 (Programming Concepts – Operators and Math Logic)
#CH3_L3 (Nodes Operations – Mathematical Functions)

💡 Goal: Practice evaluating True/False expressions.
Create a number (12) and test if it is greater than 10. Display the result as True or False.
True
Tags: #boolean #logic #comparison #codeblock
Related Lessons:
#CH1_L4 (Programming Concepts – Boolean & Comparison)
#CH3_L3 (Nodes Operations – Logic and Comparison)

💡 Goal: Work with collections of data.
Create a list of numbers from 1 to 5 and retrieve the item at index 2.
3
Tags: #lists #indices #accessingdata
Related Lessons:
#CH1_L3 (Parameters and Lists)
#CH3_L1 (Nodes – Inputs and Outputs)
#CH3_L5 (Lists – Create, Access, Index)

💡 Goal: Handle invalid indices without errors.
Using the list [1, 2, 3, 4, 5], try to get the item at index 7 and return a message if it’s out of range.
“Index out of range”
Tags: #lists #conditional #safety
Related Lessons:
#CH1_L4 (Programming Concepts – Conditional Handling)
#CH3_L5 (Lists – Index Validation and Safe Access)

💡 Goal: Demonstrate If-Else logic.
Create a number (15) and build a rule that returns “Above 10” if the number is greater than 10, otherwise “10 or below.”
“Above 10”
Tags: #ifstatements #logic #conditions
Related Lessons:
#CH1_L4 (Programming Concepts – If/Else Statements)
#CH3_L3 (Nodes Operations – Conditional Logic)

💡 Goal: Apply AND logic to filter a list.
Generate numbers from 1 to 20 and keep only those greater than 5 and less than 15.
[6, 7, 8, 9, 10, 11, 12, 13, 14]
Tags: #logic #and #filter #boolean
Related Lessons:
#CH1_L4 (Programming Concepts – And/Or Logic)
#CH3_L3 (Nodes Operations – Logic Filters)
#CH4_L2 (Filtering – Using Boolean Mask or Condition)

💡 Goal: Practice reading data from Revit elements.
From the current model, list the areas of all rooms using their “Area” parameter.
[24.5, 31.2, 28.0, 19.6]
Tags: #revit #parameters #rooms #lists
Related Lessons:
#CH1_L2 (Data Types & Revit API Objects)
#CH3_L6 (Revit Nodes – Get Parameters from Elements)
#CH4_L1 (Selections – By Category or Type)
#CH4_L10 (Reading and Writing Excel – Reporting Revit Data)

💡 Goal: Combine conditional logic with Revit data.
Using the room areas from the previous task, label each as “Large” if greater than 25 m² or “Small” if less.
[“Large”, “Large”, “Small”, “Small”]
Tags: #revit #parameters #ifstatements #boolean
Related Lessons:
#CH1_L4 (Programming Concepts – If and Comparison Logic)
#CH3_L6 (Revit Nodes – Get and Set Parameters)
#CH4_L2 (Filtering – Condition-Based Data Processing)
