The Python “if” statement | Introduction to conditional execution

Published: 09 July 2021
on channel: Computer Science Camp
29
1

LINKS TO FULL CONTENT
Full lesson: https://computersciencecamp.com/cours...
Full course: https://computersciencecamp.com/cours...

FULL LESSON DESCRIPTION
So far, all of our Python programs have executed statements sequentially. In a program that has 3 lines of code, we expect line 1 to run first, then line 2, then line 3. While this execution model has already allowed us to introduce some level of interaction with the user, the real power of a programming language comes when you can alter the sequential control flow of your program by deciding what lines of code to execute, not to execute, or to execute multiple times based on certain conditions. In this lesson we introduce conditional execution as the most basic form of non-sequential control flow in Python.

FULL LESSON CONTENT
Part 1. The ‘if’ block
Part 2. The ‘if-else’ block
Part 3. The ‘if-elif-else’ block


Watch video The Python “if” statement | Introduction to conditional execution online without registration, duration hours minute second in high quality. This video was added by user Computer Science Camp 09 July 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 29 once and liked it 1 people.