2021-05-05 17:13:49 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5e444136903586ffb414c94d
|
2021-07-02 13:15:29 +00:00
|
|
|
|
title: 時間計算器
|
2021-05-05 17:13:49 +00:00
|
|
|
|
challengeType: 10
|
2021-07-02 13:15:29 +00:00
|
|
|
|
forumTopicId: 462360
|
2021-05-05 17:13:49 +00:00
|
|
|
|
dashedName: time-calculator
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
2021-07-02 13:15:29 +00:00
|
|
|
|
編寫一個名爲 “add_time” 的函數,該函數可以將一段時間添加到一個開始時間中,並返回結果。
|
2021-05-05 17:13:49 +00:00
|
|
|
|
|
2021-07-02 13:15:29 +00:00
|
|
|
|
你可以 [在 Replit 上查看整個項目的具體描述和初始代碼](https://replit.com/github/freeCodeCamp/boilerplate-time-calculator)。 訪問此鏈接後,fork 這個項目。 當你根據 “README.md” 中的說明完成了項目,請在下方提交你的項目鏈接。
|
2021-05-05 17:13:49 +00:00
|
|
|
|
|
2021-07-02 13:15:29 +00:00
|
|
|
|
我們仍在開發 Python 課程的交互式教學部分。 目前,freeCodeCamp.org YouTube 頻道上的一些視頻將會教授你這個項目需要的所有技能。
|
2021-05-05 17:13:49 +00:00
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2021-07-02 13:15:29 +00:00
|
|
|
|
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 視頻課程</a>(14 小時)
|
2021-05-05 17:13:49 +00:00
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2021-07-02 13:15:29 +00:00
|
|
|
|
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 視頻課程</a>(2 小時)
|
2021-05-05 17:13:49 +00:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
2021-07-02 13:15:29 +00:00
|
|
|
|
它應該能正確地添加時間並通過所有測試。
|
2021-05-05 17:13:49 +00:00
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
/**
|
|
|
|
|
Backend challenges don't need solutions,
|
|
|
|
|
because they would need to be tested against a full working project.
|
|
|
|
|
Please check our contributing guidelines to learn more.
|
|
|
|
|
*/
|
|
|
|
|
```
|