2021-05-05 10:13:49 -07:00
|
|
|
|
---
|
|
|
|
|
id: 5e444147903586ffb414c94f
|
2021-07-02 18:45:29 +05:30
|
|
|
|
title: 多邊形面積計算器
|
2021-05-05 10:13:49 -07:00
|
|
|
|
challengeType: 10
|
2021-07-02 18:45:29 +05:30
|
|
|
|
forumTopicId: 462363
|
2021-05-05 10:13:49 -07:00
|
|
|
|
dashedName: polygon-area-calculator
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
2021-07-02 18:45:29 +05:30
|
|
|
|
在這個項目中,你將使用面向對象的編程來創建 Rectangle(矩形) 類和 Square(正方形) 類。 Square 類應該是 Rectangle 的子類,並繼承方法和屬性。
|
2021-05-05 10:13:49 -07:00
|
|
|
|
|
2021-07-02 18:45:29 +05:30
|
|
|
|
你可以[在 Replit 上查看整個項目的具體描述和初始代碼](https://replit.com/github/freeCodeCamp/boilerplate-polygon-area-calculator)。
|
2021-05-05 10:13:49 -07:00
|
|
|
|
|
2021-07-02 18:45:29 +05:30
|
|
|
|
到達此鏈接後,fork 這個項目。 當你根據 “README.md” 中的說明完成了項目,請在下方提交你的項目鏈接。
|
2021-05-05 10:13:49 -07:00
|
|
|
|
|
2021-07-02 18:45:29 +05:30
|
|
|
|
Python 課程的交互式教學部分仍在開發當中。 目前,freeCodeCamp.org YouTube 頻道上的一些視頻將會教授你這個項目需要的所有技能。
|
2021-05-05 10:13:49 -07:00
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2021-07-02 18:45:29 +05:30
|
|
|
|
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 視頻課程</a>(14 小時)
|
2021-05-05 10:13:49 -07:00
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2021-07-02 18:45:29 +05:30
|
|
|
|
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 視頻課程</a>(2 小時)
|
2021-05-05 10:13:49 -07:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
2021-07-02 18:45:29 +05:30
|
|
|
|
它應該創建一個 Rectangle 類和 Square 類並通過所有測試。
|
2021-05-05 10:13:49 -07: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.
|
|
|
|
|
*/
|
|
|
|
|
```
|