
Medio rombo con números
Python
Publicado el 11 de Octubre del 2019 por Administrador (718 códigos)
3.519 visualizaciones desde el 11 de Octubre del 2019
Código que muestra como dibujar medio rombo con números.


obj=timeHuman()
obj.reset().setMiliseconds(2000)
print(obj.getTimeHuman())
# devolverá: 2 seconds
obj.reset().setSeconds(1480)
print(obj.getTimeHuman())
# devolverá: 24 minutes and 40 seconds
obj.reset().setMinutes(60)
print(obj.getTimeHuman())
# devolverá: 1 hour
obj.reset().setHours(3)
print(obj.getTimeHuman())
# devolverá: 3 hours
obj.reset().setHours(30).setSeconds(1480).setMiliseconds(2000)
print(obj.getTimeHuman())
# devolverá: 1 day, 6 hours, 24 minutes and 42 seconds
obj.reset().setSeconds(1441)
print(obj.getTimeHuman())
# devolverá: 24 minutes and 1 second