Computer programs can be seen as data (structures, state) and logic (algorithms, behavior).
Data changes when data values (state) changes over time, logic changes mainly when different inputs lead to different computations. Just to be clear, conditionals are the most common ways to express changes in logic, and there are a whole set of ways of doing so that are equivalent to conditionals.
Programming effectively is about grouping together data and related logic and express properly the variations of the data and the variations of the logic.
The same problem can be solved by different programs,...