Basics of Programming II
Learn the essential programming concepts of functions and control flow.
StartKey Concepts
Review core concepts you need to learn to master this subject
Conditional Control
Conditional Control
Conditional statements or conditional control structures allow a program to have different behaviors depending on certain conditions being met.
Intuitively, this mimics the way humans make simple decisions and act upon them. For example, reasoning about whether to go outside might look like:
- Condition: Is it raining outside?
- If it is raining outside, then bring an umbrella.
- Otherwise, do not bring an umbrella.
We could keep adding clauses to make our reasoning more sophisticated, such as “If it is sunny, then wear sunscreen”.
Functions
Lesson 1 of 2
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory