You've already forked Curso-lenguaje-python
Restructure content and add notes from HolaMundo
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
This commit is contained in:
34
python-total/doc_curso/08_consola_de_turnos/084principal.py
Normal file
34
python-total/doc_curso/08_consola_de_turnos/084principal.py
Normal file
@@ -0,0 +1,34 @@
|
||||
import numeros
|
||||
|
||||
def preguntar():
|
||||
|
||||
print("Bienvenido a Farmacia Python")
|
||||
|
||||
while True:
|
||||
print("[P] - Perfumería\n[F] - Farmacia\n[C] - Cosmútica")
|
||||
try:
|
||||
mi_rubro = input("Elija su rubro: ").upper()
|
||||
["P", "F", "C"].index(mi_rubro)
|
||||
except ValueError:
|
||||
print("Esa no es una opción válida")
|
||||
else:
|
||||
break
|
||||
|
||||
numeros.decorador(mi_rubro)
|
||||
|
||||
|
||||
def inicio():
|
||||
|
||||
while True:
|
||||
preguntar()
|
||||
try:
|
||||
otro_turno = input("Quieres sacar otro turno? [S] [N]: ").upper()
|
||||
["S", "N"].index(otro_turno)
|
||||
except ValueError:
|
||||
print("Esa noes una opción válida")
|
||||
else:
|
||||
if otro_turno == "N":
|
||||
print("Gracias por su visita")
|
||||
break
|
||||
|
||||
inicio()
|
||||
Reference in New Issue
Block a user