python:scratch2python:equivalences_entre_scratch_et_python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
python:scratch2python:equivalences_entre_scratch_et_python [2021/12/29 18:32] – [Les fonctions] fabpython:scratch2python:equivalences_entre_scratch_et_python [2021/12/29 18:32] (current) – [Les conditions] fab
Line 52: Line 52:
 |<100% 400px 400px ->| |<100% 400px 400px ->|
 ^ Python ^ Scratch ^ Commentaire ^ ^ Python ^ Scratch ^ Commentaire ^
-|<code>if mon_age < 18:+|<code python>if mon_age < 18:
     print("Je suis mineur")</code>|{{:python:scratch2python:pasted:20211227-154556.png}}|L' instruction ''print'' est exécutée seulement si la condition qui suit l'instruction ''if'' est vraie|     print("Je suis mineur")</code>|{{:python:scratch2python:pasted:20211227-154556.png}}|L' instruction ''print'' est exécutée seulement si la condition qui suit l'instruction ''if'' est vraie|
-|<code>if mon_age < 18:+|<code python>if mon_age < 18:
     print("Je suis mineur")     print("Je suis mineur")
 else: else:
     print("Je suis majeur")</code>|{{:python:scratch2python:pasted:20211227-160135.png}}|Si la condition qui suit l'instruction ''if'' est vraie, alors la première instruction ''print'' est exécutée, sinon, la seconde est exécutée.|     print("Je suis majeur")</code>|{{:python:scratch2python:pasted:20211227-160135.png}}|Si la condition qui suit l'instruction ''if'' est vraie, alors la première instruction ''print'' est exécutée, sinon, la seconde est exécutée.|
-|<code>if ma_vitesse > 0:+|<code python>if ma_vitesse > 0:
     print("J'avance")     print("J'avance")
 elif ma_vitesse < 0: elif ma_vitesse < 0:
  • python/scratch2python/equivalences_entre_scratch_et_python.1640799139.txt.gz
  • Last modified: 2021/12/29 18:32
  • by fab