18 lines
328 B
Markdown
Executable File
18 lines
328 B
Markdown
Executable File
#### Exercícios propostos no [CodeCheck](https://horstmann.com/codecheck/index.html)
|
|
|
|
___
|
|
|
|
## Ex 10.
|
|
|
|
def hms2sec(h, m, s):<br />
|
|
 sec = h * 3600 + m * 60 + s
|
|
 return sec
|
|
___
|
|
|
|
## Ex 11.
|
|
|
|
def sec2hms(sec):<br />
|
|
 h = sec // 3600<br />
|
|
 m = (sec // 60) % 60<br />
|
|
 s = sec % 60<br />
|
|
 return h, m, s |