Telephone Directory
Solved
```python
def menu():
choix = input("0-quitter\n1-écrire dans le répertoire\n2-rechercher dans le répertoire\nVotre choix ?")
return choix
while True:
choix = input("0-quitter\n1-écrire dans le répertoire\n2-rechercher dans le répertoire\n\nVotre choix ?")
choix = int(choix)
if choix == 0:
print("Vous avez quitté cette page")
break
elif choix == 1:
print("Nom (0 pour terminer): \nTéléphone: ")
# insérer le programme de saisie
break
elif choix == 2:
print("Entrez un nom : \nLe numéro recherché est : ")
# insérer le programme de recherche
break
else:
continue
```
def menu():
choix = input("0-quitter\n1-écrire dans le répertoire\n2-rechercher dans le répertoire\nVotre choix ?")
return choix
while True:
choix = input("0-quitter\n1-écrire dans le répertoire\n2-rechercher dans le répertoire\n\nVotre choix ?")
choix = int(choix)
if choix == 0:
print("Vous avez quitté cette page")
break
elif choix == 1:
print("Nom (0 pour terminer): \nTéléphone: ")
# insérer le programme de saisie
break
elif choix == 2:
print("Entrez un nom : \nLe numéro recherché est : ")
# insérer le programme de recherche
break
else:
continue
```
2 answers
-
Hello
The # at the beginning of the lines symbolize indentations, I couldn't do otherwise '^^
If you can, and must do it differently.
CCM like all coding forums has a dedicated tool: https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code
You still have time to edit your message to make it properly readable
--
When I was little, the Dead Sea was just sick.
George Burns -
ContributorHello, can you mark this discussion as resolved or follow up on it?
-
-
-
Contributor@dazdingueIt's done.
-
@yg_beoh well great thank you very much! :D
Have a nice day and thanks for the help :)
-