📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

public viral

Z&C20241:06

Transcription

Hello everyone and welcome back to the channel. Today we're going to be talking about conditional statements.

So what exactly is a conditional statement? Well, it's a statement that will execute a certain block of code if a certain condition is true. For example, if it's raining outside, then I will take an umbrella. The condition is whether or not it's raining, and the code that will execute if that condition is true is me taking an umbrella. If the condition is false, meaning it's not raining, then the code won't execute, and I won't take an umbrella.

Or, here's another example: if I'm hungry, then I will eat food. The condition is whether or not I'm hungry, and the code that will execute if that condition is true is me eating food.

Conditional statements are used all the time in programming to make decisions based on different conditions. For example, a game might use a conditional statement to check if a player has enough health to continue playing.

So that's a basic overview of conditional statements. I hope you found this video helpful. Thanks for watching.