Day 15

 Conditionals

Today I learned one of the most important programming concepts, which is conditions.


The conditions we use in normal life are exactly the ones we use in programming, for example when a mother says to her son, “If you finish your homework, I will allow you to play.”


Now I want to do something, but this order can only be executed under a certain condition. If it is met, the order will be executed. If it is not fulfilled, it will not be executed.


This is done through the Control field and then bringing the if command.


But before anything else, the forever command must be shared with us so that the computer always receives the condition and does not stop at a specific moment.


Example: If the mouse touches the object, it will meow.


We will write the commands like this:



Comments

Popular posts from this blog

Day 2

Day 17

Day 1