Probleme indentee python
Fermé
bigstef
Messages postés
41
Date d'inscription
mardi 2 janvier 2007
Statut
Membre
Dernière intervention
28 juin 2013
-
28 janv. 2007 à 01:50
bigstef Messages postés 41 Date d'inscription mardi 2 janvier 2007 Statut Membre Dernière intervention 28 juin 2013 - 28 janv. 2007 à 23:26
bigstef Messages postés 41 Date d'inscription mardi 2 janvier 2007 Statut Membre Dernière intervention 28 juin 2013 - 28 janv. 2007 à 23:26
SALUT,COMME JE SUIS SUPER DEBUTANT AVEC PYTHON JE VAIS ESSAYER DE ME FAIRE COMPRENDRE:(J'UTILISE IDLE 1.2)
>>>a=20
>>>if(a>100):
print"a depasse la centaine"
else:
A PARTIR D'ICI CA DECONNE. LE PROMPT PRINCIPAL>>> N'EST PAS REMPLACE PAR LE PROMPT SECONDAIRE...(AVANT PRINT) ET QUAND JE FAIT ENTER APRES ELSE J'AI DROIT A UN "SYNTAX ERROR"
C'EST QUOI LE PROBLEME?MERCI D'AVANCE.
>>>a=20
>>>if(a>100):
print"a depasse la centaine"
else:
A PARTIR D'ICI CA DECONNE. LE PROMPT PRINCIPAL>>> N'EST PAS REMPLACE PAR LE PROMPT SECONDAIRE...(AVANT PRINT) ET QUAND JE FAIT ENTER APRES ELSE J'AI DROIT A UN "SYNTAX ERROR"
C'EST QUOI LE PROBLEME?MERCI D'AVANCE.
A voir également:
- Probleme indentee python
- Citizen code python avis - Accueil - Outils
- Python generator - Télécharger - Sécurité
- Mot secret python pix ✓ - Forum Python
- Python pix ✓ - Forum Python
2 réponses
krabs
Messages postés
54
Date d'inscription
samedi 27 janvier 2007
Statut
Membre
Dernière intervention
8 novembre 2007
20
28 janv. 2007 à 10:24
28 janv. 2007 à 10:24
Je pense qu'il s'agit d'une erreur classique: Python est sensible au espace!!
>>>a=20 >>>if(a>100): >>> print "a depasser la centaine" >>>else: >>> print "ne depasse pas la centaine"
bigstef
Messages postés
41
Date d'inscription
mardi 2 janvier 2007
Statut
Membre
Dernière intervention
28 juin 2013
1
28 janv. 2007 à 23:26
28 janv. 2007 à 23:26
merci pour ta reponse mais c'est pas ca.les espaces sont respectes.qu'est ce que ca pourrais etre d'autres?merci