Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Pedir la hora, minutos y segundos y mostrar la hora del segundo siguiente
- # 6:59:59 - 7:00:00
- hora = int(input('Escribe la hora: '))
- minuto = int(input('Escribe los minutos: '))
- segundo = int(input('Escribe los segundos: '))
- h = 0
- m = 0
- s = 0
- if hora < 24 and minuto < 59 and segundo < 59:
- print('La hora siguente es: ' + str(hora) + ':' + str(minuto) + ':' + str(segundo + 1))
- elif hora < 24 and minuto < 59:
- print('La hora siguente es: ' + str(hora) + ':' + str(minuto + 1) + ':00')
- else:
- print('La hora siguente es: ' + str(hora) + ':' + str(minuto) + ':' + str(segundo))
- if minuto < 60:
- m += 1
- else:
- m = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement