Written by the Fiveable Content Team โข Last updated August 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated August 2025
Definition
A code segment refers to a portion of a program that contains executable instructions or commands. It is where the actual code that performs specific tasks or operations is written.
Function: A function is a self-contained block of code that performs a specific task. It can be called and executed from different parts of the program.
Control Flow: Control flow refers to the order in which statements and instructions are executed in a program. It determines the path and direction the program takes based on conditions and loops.
Syntax: Syntax refers to the set of rules and guidelines that define the structure and format of valid programming code in order for it to be correctly interpreted by the computer.