Leçon 1 de 0
En cours

Initiation au code – Comprendre les expressions conditionnelles

Yann KIDSHAKER 14 janvier 2026

Welcome to the second level, evivers! Hope that your first step into the world of programming was an enjoyable one.

In the previous chapter we ‘tried out’ certain appetizers; here, we’re going to have a look at the ingredients that spice up the dishes a.k.a. the programs, or in ‘Scratch’ language, the scripts, and give them their flavour. They are:

  1. Variables: They can store different values of the same type as the programming is running. They are of great advantage. The same variables can be used to store and/or process different data of the same type. They make the program small due to which it takes less space in computer’s memory.
  2. Operators: In computer programming, operators are characters that perform different functions on both variables and constants. E.g. in 1+2, 1 and 2 are called operands, and + is the operator. Operators allow the programmer to carry out different mathematical functions on data and compare data. Operators can also be used to write conditional statements.
  3. Conditional Statements: Conditional statements, as the name suggests, check whether the condition specified, is true or false. Conditional statements make it possible to test a variable against a value/compare a variable with another variable and make the program act in one way if the condition is met, and another if it isn’t. they make the program very powerful and be able to be used for a vast variety of purposes, from creating simple calculators to controlling robots.

Let’s have a look at them one by one.