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:
41
python-total/dia_08/05_probando_pylint/numeros.py
Normal file
41
python-total/dia_08/05_probando_pylint/numeros.py
Normal file
@@ -0,0 +1,41 @@
|
||||
"""
|
||||
Numeros para práctica
|
||||
"""
|
||||
|
||||
|
||||
def numeros_perfumeria():
|
||||
"""Esto es un comentario"""
|
||||
for numeros_perfum in range(1, 10000):
|
||||
yield f"P - {numeros_perfum}"
|
||||
|
||||
|
||||
def numeros_farmacia():
|
||||
"""Esto es un comentario"""
|
||||
for numeros_farma in range(1, 10000):
|
||||
yield f"F - {numeros_farma}"
|
||||
|
||||
|
||||
def numeros_cosmetica():
|
||||
"""Esto es un comentario"""
|
||||
for numeros_cosmetic in range(1, 10000):
|
||||
yield f"C - {numeros_cosmetic}"
|
||||
|
||||
|
||||
p = numeros_perfumeria()
|
||||
f = numeros_farmacia()
|
||||
c = numeros_cosmetica()
|
||||
|
||||
|
||||
def decorador(rubro):
|
||||
"""Esto es un comentario"""
|
||||
|
||||
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")
|
||||
12
python-total/dia_08/05_probando_pylint/practica_pylint.py
Normal file
12
python-total/dia_08/05_probando_pylint/practica_pylint.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
Esto es un comentario
|
||||
"""
|
||||
|
||||
|
||||
def sumar(numero1, numero2):
|
||||
""" Comentando tal y tal """
|
||||
return numero1+numero2
|
||||
|
||||
|
||||
SUMA = sumar(5, 7)
|
||||
print(SUMA)
|
||||
Reference in New Issue
Block a user