Boucle if en python
safa.bahri
-
rlo73 Messages postés 2956 Date d'inscription Statut Membre Dernière intervention -
rlo73 Messages postés 2956 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
J'ai tapé ce code:
for k in range(s):
for i in range(1,n-1):
m.addConstr( if Assign[i][k]== 0, z[k,i]==0 )
et en exécutant, ce message d'erreur apparait:
m.addConstr( if Assign[i][k]== 0 z[k,i]==0 )
^
SyntaxError: invalid syntax
pouvez vous m'expliquer ma faute ?
Merci d'avance
J'ai tapé ce code:
for k in range(s):
for i in range(1,n-1):
m.addConstr( if Assign[i][k]== 0, z[k,i]==0 )
et en exécutant, ce message d'erreur apparait:
m.addConstr( if Assign[i][k]== 0 z[k,i]==0 )
^
SyntaxError: invalid syntax
pouvez vous m'expliquer ma faute ?
Merci d'avance
A voir également:
- Boucle if en python
- Citizen code python avis - Accueil - Outils
- Ce programme est écrit en python ✓ - Forum Python
- Python pix ✓ - Forum Python
- Mot secret python pix ✓ - Forum Python
- Mon pc s'allume et s'éteint en boucle ✓ - Forum Matériel & Système