Curso-lenguaje-python/python-total/doc_curso/08_consola_de_turnos/083numeros.py

33 lines
618 B
Python
Raw Permalink Normal View History

2023-05-14 13:18:02 +02:00
def numeros_perfumeria():
for n in range(1, 10000):
yield f"P - {n}"
def numeros_farmacia():
for n in range(1, 10000):
yield f"F - {n}"
def numeros_cosmetica():
for n in range(1, 10000):
yield f"C - {n}"
p = numeros_perfumeria()
f = numeros_farmacia()
c = numeros_cosmetica()
def decorador(rubro):
print("\n" + "*" * 23)
print("Su número es:")
if rubro == "P":
print(next(p))
elif rubro == "F":
print(next(f))
else:
print(next(c))
print("Aguarde y será atendido")
print("*" * 23 + "\n")