- Home
- /
- CS Thinking
- /
- Programming Fundamentals
Programming Fundamentals
12 concepts in CS Thinking
Programming fundamentals cover the core building blocks that every programming language shares. Students learn how variables store data through assignment, and how different data types β integers, strings, and booleans β represent different kinds of information. They study control flow in depth: nested conditionals for complex decision-making, while loops for repeating actions until a condition is met, and for loops for iterating a known number of times. Functions are explored through return values and scope, helping students write modular, reusable code. Event handlers introduce the concept of programs that respond to user actions rather than just running sequentially. File operations extend a program's reach beyond memory to persistent storage. Together, these fundamentals give students the tools to build programs that are structured, readable, and capable of solving real problems.
Suggested learning path: Start with variables, assignment, and basic data types, then study conditionals and loops in depth, learn about functions with return values and scope, and finally explore event-driven programming and file operations.
Assignment
The operation of storing a value in a variable. The variable name goes on the left, the value on the right.
Integer
A data type that represents whole numbers (positive, negative, or zero) without decimal points.
String
A data type that represents a sequence of characters (text), enclosed in quotation marks.
Boolean
A data type representing a logical value that can only be true or falseβnothing else.
Return Values
The value that a function sends back to the code that called it, specified by the return statement.
Scope
The region of a program where a variable is accessible. Variables defined inside a function have local scope; variables defined outside have global scope.
Nested Conditionals
Conditional statements placed inside other conditional statements, creating multiple levels of decision-making.
While Loop
A control structure that repeats a block of code as long as a specified condition remains true.
For Loop
A control structure that repeats a block of code a specific number of times or for each item in a collection.
Event Handler
A function that is automatically called when a specific event occurs, such as a button click, key press, or timer tick.
File Operations
The operations of reading data from files and writing data to files on a storage device, allowing programs to persist information beyond a single run.
Function
A named, reusable block of code that performs a specific task and can optionally accept inputs and return a result.