Deutsch   English   Français   Italiano  
<qIKcnVu2Q9MEqL3-nZ2dnZfqlJ9h4p2d@giganews.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 13 Sep 2022 07:47:37 +0000
Newsgroups: fr.comp.lang.python
Subject: Re: Probl�me boucl
X-poster: PEAR::Net_NNTP v1.5.0 (stable)
From: gigi123 <nospam_giannivolturno5@gmail.com.invalid>
References: <nr-dnXJMLK7BhoL-nZ2dnZfqlJxh4p2d@giganews.com> <tfnm8q$29s2s$1@dont-email.me>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
Organization: !No_Organization!
Message-ID: <qIKcnVu2Q9MEqL3-nZ2dnZfqlJ9h4p2d@giganews.com>
Date: Tue, 13 Sep 2022 07:47:37 +0000
Lines: 58
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-csijOqGHgOanYTnv5HTdYL++9zH3nz9ituhFUELeBngC+wVbejoTubl/oCFASvWlXLb2I2U51erqI0S!MtRUvf34mm+MTRgyyrb8yEVnlqSuHbIyq0ysLGXt0e2LUhcH2XJ8tbEVZAt64z+STVamOD99FN6R
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Bytes: 2623
X-Original-Lines: 56

Le lundi 12 Septembre 2022 � 18:20 par Dominique :
> Le 12/09/2022 ͠ 13:43, gigi123 a �crit :
>> Bonjour,
>> 
>> Voil͠ j'aimerai que mon �l�ment res[j]
>> s'incr�mente lorsqu'il trouve la
>> condition d'�galit� avec la 2nd liste, sans sortie de la boucle
>> while.
>> 
>> voici le code :
>> 
>> identique = True
>> a=0 #variable qui parcours ma 2nd liste
>> b=0 #compteurs cat�gorie urnes standars
>> c=0 #compteurs cat�gorie consommables
>> d=0 #compteurs cat�gorie urnes d�coratives
>> e=0 #compteurs cat�gorie cyclavet
>> f=0 #compteurs cat�gorie bijoux
>> g=0 #variable qui parcours ma 1�re liste
>> j=0 #VARIABLE PREMIERE LISTE
>> 
>> while identique == True and j==0 :
>> 
>> if res[j] != conso[a]:
>> a = a+1
>> 
>> 
>> if res[j]==conso[a]:
>> res[j]=res[j+1]
>> if conso1[a] == 'Cat�gorie A':
>> b=b+1
>> else:
>> if conso1[a] == 'Cat�gorie B':
>> c=c+1
>> else:
>> if conso1[a] == 'Cat�gorie C':
>> d=d+1
>> else:
>> if conso1[a] == 'Cat�gorie F':
>> e=e+1
>> else:
>> if conso1[a] == 'Cat�gorie G':
>> f=f+1
>> 
>> identique = False
>> 
>> 
> Bonsoir,
> D'embl�e, je ne vois pas d'o͹ sortent les variables res et
> conso. De
> plus, quel probl�me rencontrez-vous ?
Bonjour, 

Res et conso sont 2 listes.

J'aimerai d�s lors qu'il trouve l'�galit� entre 2 indices des deux listes (
res[j] == conso[a] et une fois qu'il a incr�ment� une variable en fonction du
r�sultat, qu'ils repartent au d�but du while pour faire l'indice j+1 pour la
premi�re liste