« Programmation Python/Booléens » : différence entre les versions

Contenu supprimé Contenu ajouté
DannyS712 (discussion | contributions)
m <source> -> <syntaxhighlight> (phab:T237267)
Balises : Révoqué Éditeur visuel
Ligne 180 :
== Exemple ==
Créer le fichier ''password1.py'' :
<syntaxhighlight lang="python">
#!/usr/bin/python
# -*- coding:Utf-8 -*-
Ligne 189 :
if name == "Josh" and password == "Friday":
print("Welcome Josh")
else:print("I don't know you.")
elif name == "Fred" and password == "Rock":
print("Welcome Fred")
else:
print("I don't know you.")
</syntaxhighlight>