You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
- Booléens et conditions
- ======================
-
- True et False
- --------------
-
-
- En Python ce sont des mots-clés et les valeurs sont en majuscules!
-
-
- Assignation
- -----------
-
- On peut assigner des variables aux valeurs True et False
-
-
- .. code-block:: python
-
- la_terre_est_plate = False
- python_c_est_genial = True
-
-
- ## Comparaisons
-
- .. code-block:: python
-
- >>> a = 2
- >>> b = 3
- >>> a > b
- False
-
- .. code-block:: python
-
- >>> 2 + 2 == 4
- True
-
- Note: ``==`` pour la comparaison, ``=`` pour l'assignation
-
-
- ```
- >>> a = 2
- >>> b = 3
- >>> a != b
- True
- >>> 2 + 2 >= 4
- True
- ```
-
-
- ```
- >>> a = 2
- >>> a < 2
- False
- >>> 1 < a < 3
- True
- ```
|