Conditionals: The Power of True vs. False

alpharithms fallback 1

Conditionals are statements used in computer programming to make decisions. They rely on determining whether a certain condition is True or False after which actions are taken accordingly. Conditionals are at the core of computer science and used to build powerful abstractions found in all higher-level programming languages.

Conditionals are often visualized as branching tree structures. At each intersection, the programmer asks for a True or False statement. Depending on how that question is answered, the program then runs the logic of another branch. For example:

IF I need to go to the grocery store THEN take a left ELSE to take a right to go home.

Conditional statements aren’t restricted to computer science. Business and personal decisions can benefit greatly from implementing conditionals to other problem-solving strategies. Outside of computing, conditional statements are often called logic trees. The premise is the same—just wrapped up in friendlier semantics. Combined with consideration for the Pros and Cons of a decision, these structures can help build powerful decision-making frameworks for a range of uses.

Zαck West
Seasoned engineer with a decade of specializing in Python and backend services for scalable applications, leveraging reusable patterns, OOP, and TDD. Strong background in Full-Stack development, design, and digital marketing. Talk to me about deep reinforcement learning, trading algorithms, web scraping, and meditation.