uaveiro-leci/1ano/1semestre/fp/aula03/ex10_11.md

328 B
Executable File
Raw Blame History

Exercícios propostos no CodeCheck


Ex 10.

def hms2sec(h, m, s):
sec = h * 3600 + m * 60 + s return sec


Ex 11.

def sec2hms(sec):
h = sec // 3600
m = (sec // 60) % 60
s = sec % 60
return h, m, s