Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > fr.comp.lang.python > #3719
| Path | csiph.com!aioe.org!FdrTMw7+RJa5kGNwdwd/KQ.user.46.165.242.91.POSTED!not-for-mail |
|---|---|
| From | Dominique <zzz@aol.com.invalid> |
| Newsgroups | fr.comp.lang.python |
| Subject | Re: Sortir d 'une boucle while |
| Date | Mon, 31 Jan 2022 06:35:38 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <st7sfb$14na$2@gioia.aioe.org> (permalink) |
| References | <zM6dnZ5wDbXEsGr8nZ2dnUU7_8zNnZ2d@giganews.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | gioia.aioe.org; logging-data="37610"; posting-host="FdrTMw7+RJa5kGNwdwd/KQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
| Content-Language | fr |
| X-Notice | Filtered by postfilter v. 0.9.2 |
| Xref | csiph.com fr.comp.lang.python:3719 |
Show key headers only | View raw
Le 31/01/2022 à 01:29, Cyrion81 a écrit :
> Bonsoir
> Je débute en python et j’ai voulu faire un programme qui ajoute un élément dans
> une liste, qui peut afficher la liste ainsi que quitte le programme.
> Je n’arrive pas a quitter le programme
> Merci de votre aide
>
> choix =""
> liste_elements = []
> liste_choix=[1,2,3,4,5]
> while True:
> #menu choix affiché
> choix =""
> print( )
> print("--------------------------------")
> print("Choisissez parmi les 3options suivantes :")
> print("1: Ajouter un élément à la liste.")
> print("2: Afficher la liste.")
> print("3: Quitter.")
>
> Je cherche a quitter le premier while ( le menu )uniquement si j ai fini
> toutes les opérarions et pressant la touche 3
Bonjour,
Vous débutez votre boucle avec while True:
Mas qu'est-ce qui est True ? Si rien n'est indiqué (comme while
essai==True), je ne vois pas comment le while peut être testé.
Back to fr.comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Sortir d 'une boucle while Cyrion81 <nospam_thy.prog@orange.fr.invalid> - 2022-01-30 18:29 -0600 Re: Sortir d 'une boucle while Dominique <zzz@aol.com.invalid> - 2022-01-31 06:35 +0100 Re: Sortir d 'une boucle while Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2022-01-31 08:01 +0100 Re: Sortir d 'une boucle while Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2022-01-31 09:27 +0100 Re: Sortir d 'une boucle while "Th.A.C" <aenleverraivac@free.fr.invalid> - 2022-01-31 23:25 +0100
csiph-web