chore(i18n,curriculum): processed translations (#42721)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f080b6c005b0e76f063
|
||||
title: Files as a Sequence
|
||||
title: 文件作爲序列
|
||||
challengeType: 11
|
||||
videoId: cIA0EokbaHE
|
||||
dashedName: files-as-a-sequence
|
||||
@ -8,31 +8,31 @@ dashedName: files-as-a-sequence
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多資源:
|
||||
|
||||
\- [Exercise](https://www.youtube.com/watch?v=il1j4wkte2E)
|
||||
\- [練習](https://www.youtube.com/watch?v=il1j4wkte2E)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What does the word 'continue' do in the middle of a loop?
|
||||
“continue”這個詞在循環中間起到什麼作用?
|
||||
|
||||
## --answers--
|
||||
|
||||
Skips to the code directly after the loop.
|
||||
循環後直接跳轉到代碼。
|
||||
|
||||
---
|
||||
|
||||
Skips to the next line in the code.
|
||||
跳到代碼的下一行。
|
||||
|
||||
---
|
||||
|
||||
Skips to the next iteration of the loop.
|
||||
跳到循環的下一個迭代。
|
||||
|
||||
---
|
||||
|
||||
Skips the next block of code.
|
||||
跳過下一個代碼塊。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f050b6c005b0e76f057
|
||||
title: Intermediate Expressions
|
||||
title: 中間表達式
|
||||
challengeType: 11
|
||||
videoId: dKgUaIa5ATg
|
||||
dashedName: intermediate-expressions
|
||||
@ -8,17 +8,17 @@ dashedName: intermediate-expressions
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多資源:
|
||||
|
||||
\- [Exercise 1](https://youtu.be/t_4DPwsaGDY)
|
||||
\- [練習 1](https://youtu.be/t_4DPwsaGDY)
|
||||
|
||||
\- [Exercise 2](https://youtu.be/wgkC8SxraAQ)
|
||||
\- [練習 2](https://youtu.be/wgkC8SxraAQ)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What will print out after running this code:
|
||||
這些代碼運作之後會打印出什麼:
|
||||
|
||||
```python
|
||||
width = 15
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0d0b6c005b0e76f075
|
||||
title: 'Networking: Using urllib in Python'
|
||||
title: '網絡:在 Python 中使用 urllib'
|
||||
challengeType: 11
|
||||
videoId: 7lFM1T_CxBs
|
||||
dashedName: networking-using-urllib-in-python
|
||||
@ -10,7 +10,7 @@ dashedName: networking-using-urllib-in-python
|
||||
|
||||
## --text--
|
||||
|
||||
What will the output of the following code be like?:
|
||||
以下代碼的輸出將是什麼樣的?
|
||||
|
||||
```python
|
||||
import urllib.request
|
||||
@ -21,15 +21,15 @@ for line in fhand:
|
||||
|
||||
## --answers--
|
||||
|
||||
Just contents of "romeo.txt".
|
||||
只有 “romeo.txt” 的內容。
|
||||
|
||||
---
|
||||
|
||||
A header and the contents of "romeo.txt".
|
||||
“romeo.txt” 的 header 和內容。
|
||||
|
||||
---
|
||||
|
||||
A header, a footer, and the contents of "romeo.txt".
|
||||
“romeo.txt” 的 header、footer 和內容。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0d0b6c005b0e76f076
|
||||
title: 'Networking: Web Scraping with Python'
|
||||
title: '網絡:使用 Python 進行 Web 爬取'
|
||||
challengeType: 11
|
||||
videoId: Uyioq2q4cEg
|
||||
dashedName: networking-web-scraping-with-python
|
||||
@ -8,19 +8,19 @@ dashedName: networking-web-scraping-with-python
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多資料:
|
||||
|
||||
\- [Exercise: socket1](https://www.youtube.com/watch?v=dWLdI143W-g)
|
||||
\- [練習:socket1](https://www.youtube.com/watch?v=dWLdI143W-g)
|
||||
|
||||
\- [Exercise: urllib](https://www.youtube.com/watch?v=8yis2DvbBkI)
|
||||
\- [練習:urllib](https://www.youtube.com/watch?v=8yis2DvbBkI)
|
||||
|
||||
\- [Exercise: urllinks](https://www.youtube.com/watch?v=g9flPDG9nnY)
|
||||
\- [練習:urllinks](https://www.youtube.com/watch?v=g9flPDG9nnY)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What Python library is used for parsing HTML documents and extracting data from HTML documents?
|
||||
哪個 Python 庫是用於解析 HTML 文檔並從中提取數據?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0c0b6c005b0e76f071
|
||||
title: Networking with Python
|
||||
title: 用 Python 聯網
|
||||
challengeType: 11
|
||||
videoId: _kJvneKVdNM
|
||||
dashedName: networking-with-python
|
||||
@ -10,7 +10,7 @@ dashedName: networking-with-python
|
||||
|
||||
## --text--
|
||||
|
||||
What Python library gives access to TCP Sockets?
|
||||
哪個 Python 庫提供對 TCP 套接字的訪問?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f160b6c005b0e76f086
|
||||
title: 'Objects: A Sample Class'
|
||||
title: '對象:一個示例類'
|
||||
challengeType: 11
|
||||
videoId: FiABKEuaSJ8
|
||||
dashedName: objects-a-sample-class
|
||||
@ -10,7 +10,7 @@ dashedName: objects-a-sample-class
|
||||
|
||||
## --text--
|
||||
|
||||
What will the following program print?:
|
||||
以下程序將打印什麼?
|
||||
|
||||
```python
|
||||
class PartyAnimal:
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f170b6c005b0e76f088
|
||||
title: 'Objects: Inheritance'
|
||||
title: '對象:繼承'
|
||||
challengeType: 11
|
||||
videoId: FBL3alYrxRM
|
||||
dashedName: objects-inheritance
|
||||
@ -10,23 +10,23 @@ dashedName: objects-inheritance
|
||||
|
||||
## --text--
|
||||
|
||||
What is inheritance in object-oriented programming?
|
||||
面向對象編程中的繼承是指什麼?
|
||||
|
||||
## --answers--
|
||||
|
||||
A new class created when a parent class is extended.
|
||||
擴展父類時創建的新類。
|
||||
|
||||
---
|
||||
|
||||
A constructed instance of a class.
|
||||
類的構造實例。
|
||||
|
||||
---
|
||||
|
||||
The ability to create a new class by extending an existing class.
|
||||
通過擴展現有類來創建新類的能力。
|
||||
|
||||
---
|
||||
|
||||
A method that is called at the moment when a class is being used to construct an object.
|
||||
在使用類構造對象時調用的方法。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f090b6c005b0e76f067
|
||||
title: Python Dictionaries
|
||||
title: Python 字典
|
||||
challengeType: 11
|
||||
videoId: dnzvfimrRMg
|
||||
dashedName: python-dictionaries
|
||||
@ -10,7 +10,7 @@ dashedName: python-dictionaries
|
||||
|
||||
## --text--
|
||||
|
||||
What does dict equal after running this code?:
|
||||
當這些代碼運行之後,dict 等於什麼?
|
||||
|
||||
```python
|
||||
dict = {"Fri": 20, "Thu": 6, "Sat": 1}
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f060b6c005b0e76f05a
|
||||
title: Python Functions
|
||||
title: Python 函數
|
||||
challengeType: 11
|
||||
videoId: 3JGF-n3tDPU
|
||||
dashedName: python-functions
|
||||
@ -10,27 +10,27 @@ dashedName: python-functions
|
||||
|
||||
## --text--
|
||||
|
||||
What is the purpose of the "def" keyword in Python?
|
||||
在 Python 中,關鍵詞 “def” 有什麼作用?
|
||||
|
||||
## --answers--
|
||||
|
||||
It is slang that means "The following code is really cool."
|
||||
這是一個俚語,代表“這些代碼真的酷斃了”。
|
||||
|
||||
---
|
||||
|
||||
It indicates the start of a function.
|
||||
它表示一個函數的開始。
|
||||
|
||||
---
|
||||
|
||||
It indicates that the following indented section of code is to be stored for later.
|
||||
它表示以下的縮進代碼段將被儲存起來以後再用。
|
||||
|
||||
---
|
||||
|
||||
It indicates the start of a function, and the following indented section of code is to be stored for later.
|
||||
它代表一個函數的開始,然後接下來的代碼會被儲存到以後使用。
|
||||
|
||||
---
|
||||
|
||||
None of the above.
|
||||
以上全都不對。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f080b6c005b0e76f064
|
||||
title: Python Lists
|
||||
title: Python 列表
|
||||
challengeType: 11
|
||||
videoId: Y0cvfDpYC_c
|
||||
dashedName: python-lists
|
||||
@ -10,7 +10,7 @@ dashedName: python-lists
|
||||
|
||||
## --text--
|
||||
|
||||
What is the value of x after running this code:
|
||||
在這些代碼運行後,x 的值是什麼?
|
||||
|
||||
```python
|
||||
fruit = "banana"
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f160b6c005b0e76f085
|
||||
title: Python Objects
|
||||
title: Python 對象
|
||||
challengeType: 11
|
||||
videoId: uJxGeTYy0us
|
||||
dashedName: python-objects
|
||||
@ -10,23 +10,23 @@ dashedName: python-objects
|
||||
|
||||
## --text--
|
||||
|
||||
Which is NOT true about objects in Python?
|
||||
關於 Python 對象的說法,哪一個是不正確的?
|
||||
|
||||
## --answers--
|
||||
|
||||
Objects get created and used.
|
||||
對象被創建和使用
|
||||
|
||||
---
|
||||
|
||||
Objects are bits of code and data.
|
||||
對象是代碼和數據的一部分
|
||||
|
||||
---
|
||||
|
||||
Objects hide detail.
|
||||
對象隱藏細節
|
||||
|
||||
---
|
||||
|
||||
Objects are one of the five standard data types.
|
||||
對象是五個標準數據類型之一
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f06f
|
||||
title: 'Regular Expressions: Matching and Extracting Data'
|
||||
title: '正則表達式:匹配和提取數據'
|
||||
challengeType: 11
|
||||
videoId: LaCZnTbQGkE
|
||||
dashedName: regular-expressions-matching-and-extracting-data
|
||||
@ -10,7 +10,7 @@ dashedName: regular-expressions-matching-and-extracting-data
|
||||
|
||||
## --text--
|
||||
|
||||
What will the following program print?:
|
||||
該程序會打印出什麼?
|
||||
|
||||
```python
|
||||
import re
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f070
|
||||
title: 'Regular Expressions: Practical Applications'
|
||||
title: '正則表達式: 實用應用'
|
||||
challengeType: 11
|
||||
videoId: xCjFU9G6x48
|
||||
dashedName: regular-expressions-practical-applications
|
||||
@ -10,7 +10,7 @@ dashedName: regular-expressions-practical-applications
|
||||
|
||||
## --text--
|
||||
|
||||
What will search for a "$" in a regular expression?
|
||||
在正則表達式中,怎麼搜索一個 “$” 符號?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f06e
|
||||
title: Regular Expressions
|
||||
title: 正則表達式
|
||||
challengeType: 11
|
||||
videoId: Yud_COr6pZo
|
||||
dashedName: regular-expressions
|
||||
@ -10,7 +10,7 @@ dashedName: regular-expressions
|
||||
|
||||
## --text--
|
||||
|
||||
Which regex matches only a white space character?
|
||||
哪一個正則表達式匹配只有一個空白字符?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f180b6c005b0e76f08f
|
||||
title: 'Relational Databases: Join Operation'
|
||||
title: '關係數據庫:聯接操作'
|
||||
challengeType: 11
|
||||
videoId: jvDw3D9GKac
|
||||
dashedName: relational-databases-join-operation
|
||||
@ -10,19 +10,19 @@ dashedName: relational-databases-join-operation
|
||||
|
||||
## --text--
|
||||
|
||||
When using a JOIN clause in an SQL statement, what does ON do?
|
||||
在 SQL 語句中使用 JOIN 子句時,ON 的作用是什麼?
|
||||
|
||||
## --answers--
|
||||
|
||||
It indicates what tables to perform the JOIN on.
|
||||
它指示在哪些表上執行 JOIN。
|
||||
|
||||
---
|
||||
|
||||
It specifies the fields to use for the JOIN.
|
||||
它指定用於 JOIN 的字段。
|
||||
|
||||
---
|
||||
|
||||
It indicates how the two tables are to be joined.
|
||||
它指示如何將兩個表連接在一起。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f190b6c005b0e76f090
|
||||
title: 'Relational Databases: Many-to-many Relationships'
|
||||
title: '關係型數據庫:多對多關係'
|
||||
challengeType: 11
|
||||
videoId: z-SBYcvEQOc
|
||||
dashedName: relational-databases-many-to-many-relationships
|
||||
@ -8,39 +8,39 @@ dashedName: relational-databases-many-to-many-relationships
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多資料:
|
||||
|
||||
\- [Exercise: Email](https://www.youtube.com/watch?v=uQ3Qv1z_Vao)
|
||||
\- [練習:電子郵件](https://www.youtube.com/watch?v=uQ3Qv1z_Vao)
|
||||
|
||||
\- [Exercise: Roster](https://www.youtube.com/watch?v=qEkUEAz8j3o)
|
||||
\- [練習:名冊](https://www.youtube.com/watch?v=qEkUEAz8j3o)
|
||||
|
||||
\- [Exercise: Tracks](https://www.youtube.com/watch?v=I-E7avcPeSE)
|
||||
\- [練習:曲目](https://www.youtube.com/watch?v=I-E7avcPeSE)
|
||||
|
||||
\- [Exercise: Twfriends](https://www.youtube.com/watch?v=RZRAoBFIH6A)
|
||||
\- [練習:推特好友](https://www.youtube.com/watch?v=RZRAoBFIH6A)
|
||||
|
||||
\- [Exercise: Twspider](https://www.youtube.com/watch?v=xBaJddvJL4A)
|
||||
\- [練習:推特爬蟲](https://www.youtube.com/watch?v=xBaJddvJL4A)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Which is an example of a many-to-many relationship?
|
||||
哪個是多對多關係的示例?
|
||||
|
||||
## --answers--
|
||||
|
||||
teacher to student
|
||||
老師與學生
|
||||
|
||||
---
|
||||
|
||||
customer to order
|
||||
客戶與訂單
|
||||
|
||||
---
|
||||
|
||||
book to pages
|
||||
書與內頁
|
||||
|
||||
---
|
||||
|
||||
city to country
|
||||
城市與國家
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f180b6c005b0e76f08e
|
||||
title: 'Relational Databases: Relationship Building'
|
||||
title: '關係型數據庫:關係的建立'
|
||||
challengeType: 11
|
||||
videoId: CSbqczsHVnc
|
||||
dashedName: relational-databases-relationship-building
|
||||
@ -10,19 +10,19 @@ dashedName: relational-databases-relationship-building
|
||||
|
||||
## --text--
|
||||
|
||||
What does the INSERT command do in SQL?
|
||||
INSERT 命令在 SQL 中的作用是什麼?
|
||||
|
||||
## --answers--
|
||||
|
||||
It defines a new row by listing the fields we want to include followed by the values we want placed in the new row.
|
||||
它定義新行,通過列出我們要包括的字段,然後列出要放入新行中的值。
|
||||
|
||||
---
|
||||
|
||||
It defines a new column by listing the rows we want to include followed by the values we want placed in the new column.
|
||||
它定義新列,通過列出要包含的行以及要放入新列中的值。
|
||||
|
||||
---
|
||||
|
||||
It defines a new table by listing the rows and fields we want to include followed by the values that we want placed in the table.
|
||||
它定義一個新表,通過列出要包括的行和字段以及要放入表中的值。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f090b6c005b0e76f066
|
||||
title: Strings and Lists
|
||||
title: 字符串和列表
|
||||
challengeType: 11
|
||||
videoId: lxcFa7ldCi0
|
||||
dashedName: strings-and-lists
|
||||
@ -8,15 +8,15 @@ dashedName: strings-and-lists
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多資源:
|
||||
|
||||
\- [Exercise](https://www.youtube.com/watch?v=-9TfJF2dwHI)
|
||||
\- [練習](https://www.youtube.com/watch?v=-9TfJF2dwHI)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What does n equal in this code?
|
||||
在這個代碼中,n 等於什麼?
|
||||
|
||||
```python
|
||||
words = 'His e-mail is q-lar@freecodecamp.org'
|
||||
@ -27,7 +27,7 @@ n = parts[1]
|
||||
|
||||
## --answers--
|
||||
|
||||
mail
|
||||
郵件
|
||||
|
||||
---
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f070b6c005b0e76f060
|
||||
title: Strings in Python
|
||||
title: Python 字符串
|
||||
challengeType: 11
|
||||
videoId: LYZj207fKpQ
|
||||
dashedName: strings-in-python
|
||||
@ -10,7 +10,7 @@ dashedName: strings-in-python
|
||||
|
||||
## --text--
|
||||
|
||||
What will the following code print?:
|
||||
這些代碼會打印出什麼?
|
||||
|
||||
```python
|
||||
for n in "banana":
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0a0b6c005b0e76f06c
|
||||
title: The Tuples Collection
|
||||
title: 元組集合
|
||||
challengeType: 11
|
||||
videoId: 3Lxpladfh2k
|
||||
dashedName: the-tuples-collection
|
||||
@ -10,7 +10,7 @@ dashedName: the-tuples-collection
|
||||
|
||||
## --text--
|
||||
|
||||
What will the following code print?:
|
||||
這些代碼會打印出什麼?
|
||||
|
||||
```python
|
||||
d = dict()
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0e0b6c005b0e76f07a
|
||||
title: Using Web Services
|
||||
title: 使用網絡服務
|
||||
challengeType: 11
|
||||
videoId: oNl1OVDPGKE
|
||||
dashedName: using-web-services
|
||||
@ -10,27 +10,27 @@ dashedName: using-web-services
|
||||
|
||||
## --text--
|
||||
|
||||
What are the two most common ways to send data over the internet?
|
||||
通過互聯網發送數據的兩種最常見的方法是什麼?
|
||||
|
||||
## --answers--
|
||||
|
||||
JSON and TXT
|
||||
JSON 和 TXT
|
||||
|
||||
---
|
||||
|
||||
JSON and XML
|
||||
JSON 和 XML
|
||||
|
||||
---
|
||||
|
||||
XML and TXT
|
||||
XML 和 TXT
|
||||
|
||||
---
|
||||
|
||||
XML and PHP
|
||||
XML 和 PHP
|
||||
|
||||
---
|
||||
|
||||
PHP and TXT
|
||||
PHP 和 TXT
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f050b6c005b0e76f056
|
||||
title: 'Variables, Expressions, and Statements'
|
||||
title: '變量、表達式和語句'
|
||||
challengeType: 11
|
||||
videoId: nELR-uyyrok
|
||||
dashedName: variables-expressions-and-statements
|
||||
@ -10,7 +10,7 @@ dashedName: variables-expressions-and-statements
|
||||
|
||||
## --text--
|
||||
|
||||
What is the symbol used in an assignment statement?
|
||||
賦值語句中使用的符號是什麼?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f150b6c005b0e76f080
|
||||
title: 'Web Services: API Rate Limiting and Security'
|
||||
title: 'Web 服務:API 速率限制和安全性'
|
||||
challengeType: 11
|
||||
videoId: pI-g0lI8ngs
|
||||
dashedName: web-services-api-rate-limiting-and-security
|
||||
@ -8,37 +8,37 @@ dashedName: web-services-api-rate-limiting-and-security
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多資料:
|
||||
|
||||
\- [Exercise: GeoJSON](https://www.youtube.com/watch?v=TJGJN0T8tak)
|
||||
\- [練習:GeoJSON](https://www.youtube.com/watch?v=TJGJN0T8tak)
|
||||
|
||||
\- [Exercise: JSON](https://www.youtube.com/watch?v=vTmw5RtfGMY)
|
||||
\- [練習:JSON](https://www.youtube.com/watch?v=vTmw5RtfGMY)
|
||||
|
||||
\- [Exercise: Twitter](https://www.youtube.com/watch?v=2c7YwhvpCro)
|
||||
\- [練習:Twitter](https://www.youtube.com/watch?v=2c7YwhvpCro)
|
||||
|
||||
\- [Exercise: XML](https://www.youtube.com/watch?v=AopYOlDa-vY)
|
||||
\- [練習:XML](https://www.youtube.com/watch?v=AopYOlDa-vY)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
When making a request from the Twitter API, what information must always be sent with the request?
|
||||
當 Twitter API 發出請求時,必須始終隨請求一起發送什麼信息?
|
||||
|
||||
## --answers--
|
||||
|
||||
Twitter username
|
||||
Twitter 用戶名
|
||||
|
||||
---
|
||||
|
||||
date range
|
||||
日期範圍
|
||||
|
||||
---
|
||||
|
||||
search term
|
||||
搜索詞
|
||||
|
||||
---
|
||||
|
||||
key
|
||||
密鑰
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f150b6c005b0e76f07f
|
||||
title: 'Web Services: APIs'
|
||||
title: 'Web 服務:API'
|
||||
challengeType: 11
|
||||
videoId: oUNn1psfBJg
|
||||
dashedName: web-services-apis
|
||||
@ -10,23 +10,23 @@ dashedName: web-services-apis
|
||||
|
||||
## --text--
|
||||
|
||||
What does API stand for?
|
||||
API 的全稱是什麼?
|
||||
|
||||
## --answers--
|
||||
|
||||
Application Portable Intelligence
|
||||
應用便攜式智能(Application Portable Intelligence)
|
||||
|
||||
---
|
||||
|
||||
Associate Programming International
|
||||
國際助理編程(Associate Programming International)
|
||||
|
||||
---
|
||||
|
||||
Application Program Interface
|
||||
應用程序接口(Application Program Interface)
|
||||
|
||||
---
|
||||
|
||||
Action Portable Interface
|
||||
動作便攜式接口(Action Portable Interface)
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f140b6c005b0e76f07e
|
||||
title: 'Web Services: Service Oriented Approach'
|
||||
title: 'Web 服務:面向服務的方法'
|
||||
challengeType: 11
|
||||
videoId: muerlsCHExI
|
||||
dashedName: web-services-service-oriented-approach
|
||||
@ -10,19 +10,19 @@ dashedName: web-services-service-oriented-approach
|
||||
|
||||
## --text--
|
||||
|
||||
With a services oriented approach to developing web apps, where is the data located?
|
||||
用面向服務的方法來開發網絡應用,數據位於何處?
|
||||
|
||||
## --answers--
|
||||
|
||||
Spread across many computer systems connected via the internet or internal network.
|
||||
分佈在許多通過互聯網或內部網絡連接的計算機系統上。
|
||||
|
||||
---
|
||||
|
||||
Within different services on the main web server.
|
||||
在主 Web 服務器上的不同服務中。
|
||||
|
||||
---
|
||||
|
||||
On a separate database server.
|
||||
在單獨的數據庫服務器上。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0e0b6c005b0e76f07c
|
||||
title: 'Web Services: XML Schema'
|
||||
title: 'Web 服務:XML 模式'
|
||||
challengeType: 11
|
||||
videoId: yWU9kTxW-nc
|
||||
dashedName: web-services-xml-schema
|
||||
@ -10,19 +10,19 @@ dashedName: web-services-xml-schema
|
||||
|
||||
## --text--
|
||||
|
||||
What is XSD?
|
||||
什麼是 XSD?
|
||||
|
||||
## --answers--
|
||||
|
||||
The W3C Schema specification for XML.
|
||||
XML 的 W3C 模式規範。
|
||||
|
||||
---
|
||||
|
||||
The standard JSON schema from MOZ.
|
||||
來自 MOZ 的標準 JSON 模式。
|
||||
|
||||
---
|
||||
|
||||
Extensible Situational Driver
|
||||
可擴展情境驅動程序
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0e0b6c005b0e76f07b
|
||||
title: 'Web Services: XML'
|
||||
title: 'Web 服務:XML'
|
||||
challengeType: 11
|
||||
videoId: _pZ0srbg7So
|
||||
dashedName: web-services-xml
|
||||
@ -10,7 +10,7 @@ dashedName: web-services-xml
|
||||
|
||||
## --text--
|
||||
|
||||
What is wrong with the following XML?:
|
||||
以下 XML 有什麼問題?
|
||||
|
||||
```xml
|
||||
<person>
|
||||
@ -23,19 +23,19 @@ What is wrong with the following XML?:
|
||||
|
||||
## --answers--
|
||||
|
||||
Email tag is missing closing tag.
|
||||
Email 標籤缺少結束標籤。
|
||||
|
||||
---
|
||||
|
||||
Spacing will cause XML to be invalid.
|
||||
間距將導致 XML 無效。
|
||||
|
||||
---
|
||||
|
||||
Phone tag is missing closing tag.
|
||||
Phone 標籤缺少結束標籤。
|
||||
|
||||
---
|
||||
|
||||
Plain text should be encoded using UTF-8.
|
||||
純文本應使用 UTF-8 編碼。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,31 +1,32 @@
|
||||
---
|
||||
id: 5e44412c903586ffb414c94c
|
||||
title: Arithmetic Formatter
|
||||
title: 算術格式化
|
||||
challengeType: 10
|
||||
forumTopicId: 462359
|
||||
dashedName: arithmetic-formatter
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
Create a function that receives a list of strings that are arithmetic problems and returns the problems arranged vertically and side-by-side.
|
||||
創建一個函數,該函數接收屬一個字符串列表,每個字符串代表一個算數問題,並返回垂直並排排列的問題。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-arithmetic-formatter).
|
||||
你可以[在 Replit 上查看整個項目的具體描述和初始代碼](https://replit.com/github/freeCodeCamp/boilerplate-arithmetic-formatter)。
|
||||
|
||||
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
訪問此鏈接後,fork 這個項目。 當你根據 “README.md” 中的說明完成了項目,請在下方提交你的項目鏈接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
我們仍在開發 Python 課程的交互式教學部分。 目前,freeCodeCamp.org YouTube 頻道上的一些視頻會教授你這個項目需要的所有技能。
|
||||
|
||||
<ul> <li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 視頻課程</a>(14 小時)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>學習 Python 視頻課程</a>(2 小時)
|
||||
</li>
|
||||
<ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should correctly format an arithmetic problem and pass all tests.
|
||||
它應該正確地格式化算術問題並通過所有測試。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,32 +1,33 @@
|
||||
---
|
||||
id: 5e44413e903586ffb414c94e
|
||||
title: Budget App
|
||||
title: 預算應用
|
||||
challengeType: 10
|
||||
forumTopicId: 462361
|
||||
dashedName: budget-app
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
Create a "Category" class that can be used to create different budget categories.
|
||||
創建一個 Category(類別) 類,該類可用於創建不同的預算類別。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-budget-app).
|
||||
你可以[在 Replit 上查看整個項目的具體描述和初始代碼](https://replit.com/github/freeCodeCamp/boilerplate-budget-app)。
|
||||
|
||||
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
訪問此鏈接後,fork 這個項目。 當你根據 “README.md” 中的說明完成了項目,請在下方提交你的項目鏈接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
我們仍在開發 Python 課程的交互式教學部分。 目前,freeCodeCamp.org YouTube 頻道上的一些視頻將會教授你這個項目需要的所有技能。
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 視頻課程</a>(14 小時)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 視頻課程</a>(2 小時)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should create a Category class and pass all tests.
|
||||
它應該創建一個 Category 類並通過所有測試。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,32 +1,33 @@
|
||||
---
|
||||
id: 5e444147903586ffb414c94f
|
||||
title: Polygon Area Calculator
|
||||
title: 多邊形面積計算器
|
||||
challengeType: 10
|
||||
forumTopicId: 462363
|
||||
dashedName: polygon-area-calculator
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
In this project you will use object oriented programming to create a Rectangle class and a Square class. The Square class should be a subclass of Rectangle and inherit methods and attributes.
|
||||
在這個項目中,你將使用面向對象的編程來創建 Rectangle(矩形) 類和 Square(正方形) 類。 Square 類應該是 Rectangle 的子類,並繼承方法和屬性。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-polygon-area-calculator).
|
||||
你可以[在 Replit 上查看整個項目的具體描述和初始代碼](https://replit.com/github/freeCodeCamp/boilerplate-polygon-area-calculator)。
|
||||
|
||||
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
到達此鏈接後,fork 這個項目。 當你根據 “README.md” 中的說明完成了項目,請在下方提交你的項目鏈接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
Python 課程的交互式教學部分仍在開發當中。 目前,freeCodeCamp.org YouTube 頻道上的一些視頻將會教授你這個項目需要的所有技能。
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 視頻課程</a>(14 小時)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 視頻課程</a>(2 小時)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should create a Rectangle class and Square class and pass all tests.
|
||||
它應該創建一個 Rectangle 類和 Square 類並通過所有測試。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,30 +1,31 @@
|
||||
---
|
||||
id: 5e44414f903586ffb414c950
|
||||
title: Probability Calculator
|
||||
title: 概率計算器
|
||||
challengeType: 10
|
||||
forumTopicId: 462364
|
||||
dashedName: probability-calculator
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
Write a program to determine the approximate probability of drawing certain balls randomly from a hat.
|
||||
寫一個程序來確定從帽子中隨機拿取特定球的大致概率。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-probability-calculator). After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
你可以在 [Replit](https://replit.com/github/freeCodeCamp/boilerplate-probability-calculator) 上查看整個項目的具體描述和初始代碼。 訪問此鏈接後,fork 這個項目。 當你根據 “README.md” 中的說明完成了項目,請在下方提交你的項目鏈接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
我們仍在開發 Python 課程的交互式教學部分。 目前,freeCodeCamp.org YouTube 頻道上的一些視頻將會教授你這個項目需要的所有技能。
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 視頻課程</a>(14 小時)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 視頻課程</a>(2 小時)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should correctly calculate probabilities and pass all tests.
|
||||
它應該能正確地計算概率並通過所有測試。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,30 +1,31 @@
|
||||
---
|
||||
id: 5e444136903586ffb414c94d
|
||||
title: Time Calculator
|
||||
title: 時間計算器
|
||||
challengeType: 10
|
||||
forumTopicId: 462360
|
||||
dashedName: time-calculator
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
Write a function named "add_time" that can add a duration to a start time and return the result.
|
||||
編寫一個名爲 “add_time” 的函數,該函數可以將一段時間添加到一個開始時間中,並返回結果。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-time-calculator). After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
你可以 [在 Replit 上查看整個項目的具體描述和初始代碼](https://replit.com/github/freeCodeCamp/boilerplate-time-calculator)。 訪問此鏈接後,fork 這個項目。 當你根據 “README.md” 中的說明完成了項目,請在下方提交你的項目鏈接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
我們仍在開發 Python 課程的交互式教學部分。 目前,freeCodeCamp.org YouTube 頻道上的一些視頻將會教授你這個項目需要的所有技能。
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 視頻課程</a>(14 小時)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 視頻課程</a>(2 小時)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should correctly add times and pass all tests.
|
||||
它應該能正確地添加時間並通過所有測試。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f080b6c005b0e76f063
|
||||
title: Files as a Sequence
|
||||
title: 文件作为序列
|
||||
challengeType: 11
|
||||
videoId: cIA0EokbaHE
|
||||
dashedName: files-as-a-sequence
|
||||
@ -8,31 +8,31 @@ dashedName: files-as-a-sequence
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多资源:
|
||||
|
||||
\- [Exercise](https://www.youtube.com/watch?v=il1j4wkte2E)
|
||||
\- [练习](https://www.youtube.com/watch?v=il1j4wkte2E)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What does the word 'continue' do in the middle of a loop?
|
||||
“continue”这个词在循环中间起到什么作用?
|
||||
|
||||
## --answers--
|
||||
|
||||
Skips to the code directly after the loop.
|
||||
循环后直接跳转到代码。
|
||||
|
||||
---
|
||||
|
||||
Skips to the next line in the code.
|
||||
跳到代码的下一行。
|
||||
|
||||
---
|
||||
|
||||
Skips to the next iteration of the loop.
|
||||
跳到循环的下一个迭代。
|
||||
|
||||
---
|
||||
|
||||
Skips the next block of code.
|
||||
跳过下一个代码块。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f050b6c005b0e76f057
|
||||
title: Intermediate Expressions
|
||||
title: 中间表达式
|
||||
challengeType: 11
|
||||
videoId: dKgUaIa5ATg
|
||||
dashedName: intermediate-expressions
|
||||
@ -8,17 +8,17 @@ dashedName: intermediate-expressions
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多资源:
|
||||
|
||||
\- [Exercise 1](https://youtu.be/t_4DPwsaGDY)
|
||||
\- [练习 1](https://youtu.be/t_4DPwsaGDY)
|
||||
|
||||
\- [Exercise 2](https://youtu.be/wgkC8SxraAQ)
|
||||
\- [练习 2](https://youtu.be/wgkC8SxraAQ)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What will print out after running this code:
|
||||
这些代码运作之后会打印出什么:
|
||||
|
||||
```python
|
||||
width = 15
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0d0b6c005b0e76f075
|
||||
title: 'Networking: Using urllib in Python'
|
||||
title: '网络:在 Python 中使用 urllib'
|
||||
challengeType: 11
|
||||
videoId: 7lFM1T_CxBs
|
||||
dashedName: networking-using-urllib-in-python
|
||||
@ -10,7 +10,7 @@ dashedName: networking-using-urllib-in-python
|
||||
|
||||
## --text--
|
||||
|
||||
What will the output of the following code be like?:
|
||||
以下代码的输出将是什么样的?
|
||||
|
||||
```python
|
||||
import urllib.request
|
||||
@ -21,15 +21,15 @@ for line in fhand:
|
||||
|
||||
## --answers--
|
||||
|
||||
Just contents of "romeo.txt".
|
||||
只有 “romeo.txt” 的内容。
|
||||
|
||||
---
|
||||
|
||||
A header and the contents of "romeo.txt".
|
||||
“romeo.txt” 的 header 和内容。
|
||||
|
||||
---
|
||||
|
||||
A header, a footer, and the contents of "romeo.txt".
|
||||
“romeo.txt” 的 header、footer 和内容。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0d0b6c005b0e76f076
|
||||
title: 'Networking: Web Scraping with Python'
|
||||
title: '网络:使用 Python 进行 Web 爬取'
|
||||
challengeType: 11
|
||||
videoId: Uyioq2q4cEg
|
||||
dashedName: networking-web-scraping-with-python
|
||||
@ -8,19 +8,19 @@ dashedName: networking-web-scraping-with-python
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多资料:
|
||||
|
||||
\- [Exercise: socket1](https://www.youtube.com/watch?v=dWLdI143W-g)
|
||||
\- [练习:socket1](https://www.youtube.com/watch?v=dWLdI143W-g)
|
||||
|
||||
\- [Exercise: urllib](https://www.youtube.com/watch?v=8yis2DvbBkI)
|
||||
\- [练习:urllib](https://www.youtube.com/watch?v=8yis2DvbBkI)
|
||||
|
||||
\- [Exercise: urllinks](https://www.youtube.com/watch?v=g9flPDG9nnY)
|
||||
\- [练习:urllinks](https://www.youtube.com/watch?v=g9flPDG9nnY)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What Python library is used for parsing HTML documents and extracting data from HTML documents?
|
||||
哪个 Python 库是用于解析 HTML 文档并从中提取数据?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0c0b6c005b0e76f071
|
||||
title: Networking with Python
|
||||
title: 用 Python 联网
|
||||
challengeType: 11
|
||||
videoId: _kJvneKVdNM
|
||||
dashedName: networking-with-python
|
||||
@ -10,7 +10,7 @@ dashedName: networking-with-python
|
||||
|
||||
## --text--
|
||||
|
||||
What Python library gives access to TCP Sockets?
|
||||
哪个 Python 库提供对 TCP 套接字的访问?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f160b6c005b0e76f086
|
||||
title: 'Objects: A Sample Class'
|
||||
title: '对象:一个示例类'
|
||||
challengeType: 11
|
||||
videoId: FiABKEuaSJ8
|
||||
dashedName: objects-a-sample-class
|
||||
@ -10,7 +10,7 @@ dashedName: objects-a-sample-class
|
||||
|
||||
## --text--
|
||||
|
||||
What will the following program print?:
|
||||
以下程序将打印什么?
|
||||
|
||||
```python
|
||||
class PartyAnimal:
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f170b6c005b0e76f088
|
||||
title: 'Objects: Inheritance'
|
||||
title: '对象:继承'
|
||||
challengeType: 11
|
||||
videoId: FBL3alYrxRM
|
||||
dashedName: objects-inheritance
|
||||
@ -10,23 +10,23 @@ dashedName: objects-inheritance
|
||||
|
||||
## --text--
|
||||
|
||||
What is inheritance in object-oriented programming?
|
||||
面向对象编程中的继承是指什么?
|
||||
|
||||
## --answers--
|
||||
|
||||
A new class created when a parent class is extended.
|
||||
扩展父类时创建的新类。
|
||||
|
||||
---
|
||||
|
||||
A constructed instance of a class.
|
||||
类的构造实例。
|
||||
|
||||
---
|
||||
|
||||
The ability to create a new class by extending an existing class.
|
||||
通过扩展现有类来创建新类的能力。
|
||||
|
||||
---
|
||||
|
||||
A method that is called at the moment when a class is being used to construct an object.
|
||||
在使用类构造对象时调用的方法。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f090b6c005b0e76f067
|
||||
title: Python Dictionaries
|
||||
title: Python 字典
|
||||
challengeType: 11
|
||||
videoId: dnzvfimrRMg
|
||||
dashedName: python-dictionaries
|
||||
@ -10,7 +10,7 @@ dashedName: python-dictionaries
|
||||
|
||||
## --text--
|
||||
|
||||
What does dict equal after running this code?:
|
||||
当这些代码运行之后,dict 等于什么?
|
||||
|
||||
```python
|
||||
dict = {"Fri": 20, "Thu": 6, "Sat": 1}
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f060b6c005b0e76f05a
|
||||
title: Python Functions
|
||||
title: Python 函数
|
||||
challengeType: 11
|
||||
videoId: 3JGF-n3tDPU
|
||||
dashedName: python-functions
|
||||
@ -10,27 +10,27 @@ dashedName: python-functions
|
||||
|
||||
## --text--
|
||||
|
||||
What is the purpose of the "def" keyword in Python?
|
||||
在 Python 中,关键词 “def” 有什么作用?
|
||||
|
||||
## --answers--
|
||||
|
||||
It is slang that means "The following code is really cool."
|
||||
这是一个俚语,代表“这些代码真的酷毙了”。
|
||||
|
||||
---
|
||||
|
||||
It indicates the start of a function.
|
||||
它表示一个函数的开始。
|
||||
|
||||
---
|
||||
|
||||
It indicates that the following indented section of code is to be stored for later.
|
||||
它表示以下的缩进代码段将被储存起来以后再用。
|
||||
|
||||
---
|
||||
|
||||
It indicates the start of a function, and the following indented section of code is to be stored for later.
|
||||
它代表一个函数的开始,然后接下来的代码会被储存到以后使用。
|
||||
|
||||
---
|
||||
|
||||
None of the above.
|
||||
以上全都不对。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f080b6c005b0e76f064
|
||||
title: Python Lists
|
||||
title: Python 列表
|
||||
challengeType: 11
|
||||
videoId: Y0cvfDpYC_c
|
||||
dashedName: python-lists
|
||||
@ -10,7 +10,7 @@ dashedName: python-lists
|
||||
|
||||
## --text--
|
||||
|
||||
What is the value of x after running this code:
|
||||
在这些代码运行后,x 的值是什么?
|
||||
|
||||
```python
|
||||
fruit = "banana"
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f160b6c005b0e76f085
|
||||
title: Python Objects
|
||||
title: Python 对象
|
||||
challengeType: 11
|
||||
videoId: uJxGeTYy0us
|
||||
dashedName: python-objects
|
||||
@ -10,23 +10,23 @@ dashedName: python-objects
|
||||
|
||||
## --text--
|
||||
|
||||
Which is NOT true about objects in Python?
|
||||
关于 Python 对象的说法,哪一个是不正确的?
|
||||
|
||||
## --answers--
|
||||
|
||||
Objects get created and used.
|
||||
对象被创建和使用
|
||||
|
||||
---
|
||||
|
||||
Objects are bits of code and data.
|
||||
对象是代码和数据的一部分
|
||||
|
||||
---
|
||||
|
||||
Objects hide detail.
|
||||
对象隐藏细节
|
||||
|
||||
---
|
||||
|
||||
Objects are one of the five standard data types.
|
||||
对象是五个标准数据类型之一
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f06f
|
||||
title: 'Regular Expressions: Matching and Extracting Data'
|
||||
title: '正则表达式:匹配和提取数据'
|
||||
challengeType: 11
|
||||
videoId: LaCZnTbQGkE
|
||||
dashedName: regular-expressions-matching-and-extracting-data
|
||||
@ -10,7 +10,7 @@ dashedName: regular-expressions-matching-and-extracting-data
|
||||
|
||||
## --text--
|
||||
|
||||
What will the following program print?:
|
||||
该程序会打印出什么?
|
||||
|
||||
```python
|
||||
import re
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f070
|
||||
title: 'Regular Expressions: Practical Applications'
|
||||
title: '正则表达式: 实用应用'
|
||||
challengeType: 11
|
||||
videoId: xCjFU9G6x48
|
||||
dashedName: regular-expressions-practical-applications
|
||||
@ -10,7 +10,7 @@ dashedName: regular-expressions-practical-applications
|
||||
|
||||
## --text--
|
||||
|
||||
What will search for a "$" in a regular expression?
|
||||
在正则表达式中,怎么搜索一个 “$” 符号?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f06e
|
||||
title: Regular Expressions
|
||||
title: 正则表达式
|
||||
challengeType: 11
|
||||
videoId: Yud_COr6pZo
|
||||
dashedName: regular-expressions
|
||||
@ -10,7 +10,7 @@ dashedName: regular-expressions
|
||||
|
||||
## --text--
|
||||
|
||||
Which regex matches only a white space character?
|
||||
哪一个正则表达式匹配只有一个空白字符?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f180b6c005b0e76f08f
|
||||
title: 'Relational Databases: Join Operation'
|
||||
title: '关系数据库:联接操作'
|
||||
challengeType: 11
|
||||
videoId: jvDw3D9GKac
|
||||
dashedName: relational-databases-join-operation
|
||||
@ -10,19 +10,19 @@ dashedName: relational-databases-join-operation
|
||||
|
||||
## --text--
|
||||
|
||||
When using a JOIN clause in an SQL statement, what does ON do?
|
||||
在 SQL 语句中使用 JOIN 子句时,ON 的作用是什么?
|
||||
|
||||
## --answers--
|
||||
|
||||
It indicates what tables to perform the JOIN on.
|
||||
它指示在哪些表上执行 JOIN。
|
||||
|
||||
---
|
||||
|
||||
It specifies the fields to use for the JOIN.
|
||||
它指定用于 JOIN 的字段。
|
||||
|
||||
---
|
||||
|
||||
It indicates how the two tables are to be joined.
|
||||
它指示如何将两个表连接在一起。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f190b6c005b0e76f090
|
||||
title: 'Relational Databases: Many-to-many Relationships'
|
||||
title: '关系型数据库:多对多关系'
|
||||
challengeType: 11
|
||||
videoId: z-SBYcvEQOc
|
||||
dashedName: relational-databases-many-to-many-relationships
|
||||
@ -8,39 +8,39 @@ dashedName: relational-databases-many-to-many-relationships
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多资料:
|
||||
|
||||
\- [Exercise: Email](https://www.youtube.com/watch?v=uQ3Qv1z_Vao)
|
||||
\- [练习:电子邮件](https://www.youtube.com/watch?v=uQ3Qv1z_Vao)
|
||||
|
||||
\- [Exercise: Roster](https://www.youtube.com/watch?v=qEkUEAz8j3o)
|
||||
\- [练习:名册](https://www.youtube.com/watch?v=qEkUEAz8j3o)
|
||||
|
||||
\- [Exercise: Tracks](https://www.youtube.com/watch?v=I-E7avcPeSE)
|
||||
\- [练习:曲目](https://www.youtube.com/watch?v=I-E7avcPeSE)
|
||||
|
||||
\- [Exercise: Twfriends](https://www.youtube.com/watch?v=RZRAoBFIH6A)
|
||||
\- [练习:推特好友](https://www.youtube.com/watch?v=RZRAoBFIH6A)
|
||||
|
||||
\- [Exercise: Twspider](https://www.youtube.com/watch?v=xBaJddvJL4A)
|
||||
\- [练习:推特爬虫](https://www.youtube.com/watch?v=xBaJddvJL4A)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Which is an example of a many-to-many relationship?
|
||||
哪个是多对多关系的示例?
|
||||
|
||||
## --answers--
|
||||
|
||||
teacher to student
|
||||
老师与学生
|
||||
|
||||
---
|
||||
|
||||
customer to order
|
||||
客户与订单
|
||||
|
||||
---
|
||||
|
||||
book to pages
|
||||
书与内页
|
||||
|
||||
---
|
||||
|
||||
city to country
|
||||
城市与国家
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f180b6c005b0e76f08e
|
||||
title: 'Relational Databases: Relationship Building'
|
||||
title: '关系型数据库:关系的建立'
|
||||
challengeType: 11
|
||||
videoId: CSbqczsHVnc
|
||||
dashedName: relational-databases-relationship-building
|
||||
@ -10,19 +10,19 @@ dashedName: relational-databases-relationship-building
|
||||
|
||||
## --text--
|
||||
|
||||
What does the INSERT command do in SQL?
|
||||
INSERT 命令在 SQL 中的作用是什么?
|
||||
|
||||
## --answers--
|
||||
|
||||
It defines a new row by listing the fields we want to include followed by the values we want placed in the new row.
|
||||
它定义新行,通过列出我们要包括的字段,然后列出要放入新行中的值。
|
||||
|
||||
---
|
||||
|
||||
It defines a new column by listing the rows we want to include followed by the values we want placed in the new column.
|
||||
它定义新列,通过列出要包含的行以及要放入新列中的值。
|
||||
|
||||
---
|
||||
|
||||
It defines a new table by listing the rows and fields we want to include followed by the values that we want placed in the table.
|
||||
它定义一个新表,通过列出要包括的行和字段以及要放入表中的值。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f090b6c005b0e76f066
|
||||
title: Strings and Lists
|
||||
title: 字符串和列表
|
||||
challengeType: 11
|
||||
videoId: lxcFa7ldCi0
|
||||
dashedName: strings-and-lists
|
||||
@ -8,15 +8,15 @@ dashedName: strings-and-lists
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多资源:
|
||||
|
||||
\- [Exercise](https://www.youtube.com/watch?v=-9TfJF2dwHI)
|
||||
\- [练习](https://www.youtube.com/watch?v=-9TfJF2dwHI)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What does n equal in this code?
|
||||
在这个代码中,n 等于什么?
|
||||
|
||||
```python
|
||||
words = 'His e-mail is q-lar@freecodecamp.org'
|
||||
@ -27,7 +27,7 @@ n = parts[1]
|
||||
|
||||
## --answers--
|
||||
|
||||
mail
|
||||
邮件
|
||||
|
||||
---
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f070b6c005b0e76f060
|
||||
title: Strings in Python
|
||||
title: Python 字符串
|
||||
challengeType: 11
|
||||
videoId: LYZj207fKpQ
|
||||
dashedName: strings-in-python
|
||||
@ -10,7 +10,7 @@ dashedName: strings-in-python
|
||||
|
||||
## --text--
|
||||
|
||||
What will the following code print?:
|
||||
这些代码会打印出什么?
|
||||
|
||||
```python
|
||||
for n in "banana":
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0a0b6c005b0e76f06c
|
||||
title: The Tuples Collection
|
||||
title: 元组集合
|
||||
challengeType: 11
|
||||
videoId: 3Lxpladfh2k
|
||||
dashedName: the-tuples-collection
|
||||
@ -10,7 +10,7 @@ dashedName: the-tuples-collection
|
||||
|
||||
## --text--
|
||||
|
||||
What will the following code print?:
|
||||
这些代码会打印出什么?
|
||||
|
||||
```python
|
||||
d = dict()
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0e0b6c005b0e76f07a
|
||||
title: Using Web Services
|
||||
title: 使用网络服务
|
||||
challengeType: 11
|
||||
videoId: oNl1OVDPGKE
|
||||
dashedName: using-web-services
|
||||
@ -10,27 +10,27 @@ dashedName: using-web-services
|
||||
|
||||
## --text--
|
||||
|
||||
What are the two most common ways to send data over the internet?
|
||||
通过互联网发送数据的两种最常见的方法是什么?
|
||||
|
||||
## --answers--
|
||||
|
||||
JSON and TXT
|
||||
JSON 和 TXT
|
||||
|
||||
---
|
||||
|
||||
JSON and XML
|
||||
JSON 和 XML
|
||||
|
||||
---
|
||||
|
||||
XML and TXT
|
||||
XML 和 TXT
|
||||
|
||||
---
|
||||
|
||||
XML and PHP
|
||||
XML 和 PHP
|
||||
|
||||
---
|
||||
|
||||
PHP and TXT
|
||||
PHP 和 TXT
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f050b6c005b0e76f056
|
||||
title: 'Variables, Expressions, and Statements'
|
||||
title: '变量、表达式和语句'
|
||||
challengeType: 11
|
||||
videoId: nELR-uyyrok
|
||||
dashedName: variables-expressions-and-statements
|
||||
@ -10,7 +10,7 @@ dashedName: variables-expressions-and-statements
|
||||
|
||||
## --text--
|
||||
|
||||
What is the symbol used in an assignment statement?
|
||||
赋值语句中使用的符号是什么?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f150b6c005b0e76f080
|
||||
title: 'Web Services: API Rate Limiting and Security'
|
||||
title: 'Web 服务:API 速率限制和安全性'
|
||||
challengeType: 11
|
||||
videoId: pI-g0lI8ngs
|
||||
dashedName: web-services-api-rate-limiting-and-security
|
||||
@ -8,37 +8,37 @@ dashedName: web-services-api-rate-limiting-and-security
|
||||
|
||||
# --description--
|
||||
|
||||
More resources:
|
||||
更多资料:
|
||||
|
||||
\- [Exercise: GeoJSON](https://www.youtube.com/watch?v=TJGJN0T8tak)
|
||||
\- [练习:GeoJSON](https://www.youtube.com/watch?v=TJGJN0T8tak)
|
||||
|
||||
\- [Exercise: JSON](https://www.youtube.com/watch?v=vTmw5RtfGMY)
|
||||
\- [练习:JSON](https://www.youtube.com/watch?v=vTmw5RtfGMY)
|
||||
|
||||
\- [Exercise: Twitter](https://www.youtube.com/watch?v=2c7YwhvpCro)
|
||||
\- [练习:Twitter](https://www.youtube.com/watch?v=2c7YwhvpCro)
|
||||
|
||||
\- [Exercise: XML](https://www.youtube.com/watch?v=AopYOlDa-vY)
|
||||
\- [练习:XML](https://www.youtube.com/watch?v=AopYOlDa-vY)
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
When making a request from the Twitter API, what information must always be sent with the request?
|
||||
当 Twitter API 发出请求时,必须始终随请求一起发送什么信息?
|
||||
|
||||
## --answers--
|
||||
|
||||
Twitter username
|
||||
Twitter 用户名
|
||||
|
||||
---
|
||||
|
||||
date range
|
||||
日期范围
|
||||
|
||||
---
|
||||
|
||||
search term
|
||||
搜索词
|
||||
|
||||
---
|
||||
|
||||
key
|
||||
密钥
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f150b6c005b0e76f07f
|
||||
title: 'Web Services: APIs'
|
||||
title: 'Web 服务:API'
|
||||
challengeType: 11
|
||||
videoId: oUNn1psfBJg
|
||||
dashedName: web-services-apis
|
||||
@ -10,23 +10,23 @@ dashedName: web-services-apis
|
||||
|
||||
## --text--
|
||||
|
||||
What does API stand for?
|
||||
API 的全称是什么?
|
||||
|
||||
## --answers--
|
||||
|
||||
Application Portable Intelligence
|
||||
应用便携式智能(Application Portable Intelligence)
|
||||
|
||||
---
|
||||
|
||||
Associate Programming International
|
||||
国际助理编程(Associate Programming International)
|
||||
|
||||
---
|
||||
|
||||
Application Program Interface
|
||||
应用程序接口(Application Program Interface)
|
||||
|
||||
---
|
||||
|
||||
Action Portable Interface
|
||||
动作便携式接口(Action Portable Interface)
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f140b6c005b0e76f07e
|
||||
title: 'Web Services: Service Oriented Approach'
|
||||
title: 'Web 服务:面向服务的方法'
|
||||
challengeType: 11
|
||||
videoId: muerlsCHExI
|
||||
dashedName: web-services-service-oriented-approach
|
||||
@ -10,19 +10,19 @@ dashedName: web-services-service-oriented-approach
|
||||
|
||||
## --text--
|
||||
|
||||
With a services oriented approach to developing web apps, where is the data located?
|
||||
用面向服务的方法来开发网络应用,数据位于何处?
|
||||
|
||||
## --answers--
|
||||
|
||||
Spread across many computer systems connected via the internet or internal network.
|
||||
分布在许多通过互联网或内部网络连接的计算机系统上。
|
||||
|
||||
---
|
||||
|
||||
Within different services on the main web server.
|
||||
在主 Web 服务器上的不同服务中。
|
||||
|
||||
---
|
||||
|
||||
On a separate database server.
|
||||
在单独的数据库服务器上。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0e0b6c005b0e76f07c
|
||||
title: 'Web Services: XML Schema'
|
||||
title: 'Web 服务:XML 模式'
|
||||
challengeType: 11
|
||||
videoId: yWU9kTxW-nc
|
||||
dashedName: web-services-xml-schema
|
||||
@ -10,19 +10,19 @@ dashedName: web-services-xml-schema
|
||||
|
||||
## --text--
|
||||
|
||||
What is XSD?
|
||||
什么是 XSD?
|
||||
|
||||
## --answers--
|
||||
|
||||
The W3C Schema specification for XML.
|
||||
XML 的 W3C 模式规范。
|
||||
|
||||
---
|
||||
|
||||
The standard JSON schema from MOZ.
|
||||
来自 MOZ 的标准 JSON 模式。
|
||||
|
||||
---
|
||||
|
||||
Extensible Situational Driver
|
||||
可扩展情境驱动程序
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5e7b9f0e0b6c005b0e76f07b
|
||||
title: 'Web Services: XML'
|
||||
title: 'Web 服务:XML'
|
||||
challengeType: 11
|
||||
videoId: _pZ0srbg7So
|
||||
dashedName: web-services-xml
|
||||
@ -10,7 +10,7 @@ dashedName: web-services-xml
|
||||
|
||||
## --text--
|
||||
|
||||
What is wrong with the following XML?:
|
||||
以下 XML 有什么问题?
|
||||
|
||||
```xml
|
||||
<person>
|
||||
@ -23,19 +23,19 @@ What is wrong with the following XML?:
|
||||
|
||||
## --answers--
|
||||
|
||||
Email tag is missing closing tag.
|
||||
Email 标签缺少结束标签。
|
||||
|
||||
---
|
||||
|
||||
Spacing will cause XML to be invalid.
|
||||
间距将导致 XML 无效。
|
||||
|
||||
---
|
||||
|
||||
Phone tag is missing closing tag.
|
||||
Phone 标签缺少结束标签。
|
||||
|
||||
---
|
||||
|
||||
Plain text should be encoded using UTF-8.
|
||||
纯文本应使用 UTF-8 编码。
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
@ -1,31 +1,32 @@
|
||||
---
|
||||
id: 5e44412c903586ffb414c94c
|
||||
title: Arithmetic Formatter
|
||||
title: 算术格式化
|
||||
challengeType: 10
|
||||
forumTopicId: 462359
|
||||
dashedName: arithmetic-formatter
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
Create a function that receives a list of strings that are arithmetic problems and returns the problems arranged vertically and side-by-side.
|
||||
创建一个函数,该函数接收属一个字符串列表,每个字符串代表一个算数问题,并返回垂直并排排列的问题。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-arithmetic-formatter).
|
||||
你可以[在 Replit 上查看整个项目的具体描述和初始代码](https://replit.com/github/freeCodeCamp/boilerplate-arithmetic-formatter)。
|
||||
|
||||
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
访问此链接后,fork 这个项目。 当你根据 “README.md” 中的说明完成了项目,请在下方提交你的项目链接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
我们仍在开发 Python 课程的交互式教学部分。 目前,freeCodeCamp.org YouTube 频道上的一些视频会教授你这个项目需要的所有技能。
|
||||
|
||||
<ul> <li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 视频课程</a>(14 小时)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>学习 Python 视频课程</a>(2 小时)
|
||||
</li>
|
||||
<ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should correctly format an arithmetic problem and pass all tests.
|
||||
它应该正确地格式化算术问题并通过所有测试。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,32 +1,33 @@
|
||||
---
|
||||
id: 5e44413e903586ffb414c94e
|
||||
title: Budget App
|
||||
title: 预算应用
|
||||
challengeType: 10
|
||||
forumTopicId: 462361
|
||||
dashedName: budget-app
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
Create a "Category" class that can be used to create different budget categories.
|
||||
创建一个 Category(类别) 类,该类可用于创建不同的预算类别。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-budget-app).
|
||||
你可以[在 Replit 上查看整个项目的具体描述和初始代码](https://replit.com/github/freeCodeCamp/boilerplate-budget-app)。
|
||||
|
||||
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
访问此链接后,fork 这个项目。 当你根据 “README.md” 中的说明完成了项目,请在下方提交你的项目链接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
我们仍在开发 Python 课程的交互式教学部分。 目前,freeCodeCamp.org YouTube 频道上的一些视频将会教授你这个项目需要的所有技能。
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 视频课程</a>(14 小时)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 视频课程</a>(2 小时)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should create a Category class and pass all tests.
|
||||
它应该创建一个 Category 类并通过所有测试。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,32 +1,33 @@
|
||||
---
|
||||
id: 5e444147903586ffb414c94f
|
||||
title: Polygon Area Calculator
|
||||
title: 多边形面积计算器
|
||||
challengeType: 10
|
||||
forumTopicId: 462363
|
||||
dashedName: polygon-area-calculator
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
In this project you will use object oriented programming to create a Rectangle class and a Square class. The Square class should be a subclass of Rectangle and inherit methods and attributes.
|
||||
在这个项目中,你将使用面向对象的编程来创建 Rectangle(矩形) 类和 Square(正方形) 类。 Square 类应该是 Rectangle 的子类,并继承方法和属性。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-polygon-area-calculator).
|
||||
你可以[在 Replit 上查看整个项目的具体描述和初始代码](https://replit.com/github/freeCodeCamp/boilerplate-polygon-area-calculator)。
|
||||
|
||||
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
到达此链接后,fork 这个项目。 当你根据 “README.md” 中的说明完成了项目,请在下方提交你的项目链接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
Python 课程的交互式教学部分仍在开发当中。 目前,freeCodeCamp.org YouTube 频道上的一些视频将会教授你这个项目需要的所有技能。
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 视频课程</a>(14 小时)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 视频课程</a>(2 小时)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should create a Rectangle class and Square class and pass all tests.
|
||||
它应该创建一个 Rectangle 类和 Square 类并通过所有测试。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,30 +1,31 @@
|
||||
---
|
||||
id: 5e44414f903586ffb414c950
|
||||
title: Probability Calculator
|
||||
title: 概率计算器
|
||||
challengeType: 10
|
||||
forumTopicId: 462364
|
||||
dashedName: probability-calculator
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
Write a program to determine the approximate probability of drawing certain balls randomly from a hat.
|
||||
写一个程序来确定从帽子中随机拿取特定球的大致概率。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-probability-calculator). After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
你可以在 [Replit](https://replit.com/github/freeCodeCamp/boilerplate-probability-calculator) 上查看整个项目的具体描述和初始代码。 访问此链接后,fork 这个项目。 当你根据 “README.md” 中的说明完成了项目,请在下方提交你的项目链接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
我们仍在开发 Python 课程的交互式教学部分。 目前,freeCodeCamp.org YouTube 频道上的一些视频将会教授你这个项目需要的所有技能。
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 视频课程</a>(14 小时)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 视频课程</a>(2 小时)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should correctly calculate probabilities and pass all tests.
|
||||
它应该能正确地计算概率并通过所有测试。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,30 +1,31 @@
|
||||
---
|
||||
id: 5e444136903586ffb414c94d
|
||||
title: Time Calculator
|
||||
title: 时间计算器
|
||||
challengeType: 10
|
||||
forumTopicId: 462360
|
||||
dashedName: time-calculator
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
Write a function named "add_time" that can add a duration to a start time and return the result.
|
||||
编写一个名为 “add_time” 的函数,该函数可以将一段时间添加到一个开始时间中,并返回结果。
|
||||
|
||||
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-time-calculator). After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
|
||||
你可以 [在 Replit 上查看整个项目的具体描述和初始代码](https://replit.com/github/freeCodeCamp/boilerplate-time-calculator)。 访问此链接后,fork 这个项目。 当你根据 “README.md” 中的说明完成了项目,请在下方提交你的项目链接。
|
||||
|
||||
We are still developing the interactive instructional part of the Python curriculum. For now, here are some videos on the freeCodeCamp.org YouTube channel that will teach you everything you need to know to complete this project:
|
||||
我们仍在开发 Python 课程的交互式教学部分。 目前,freeCodeCamp.org YouTube 频道上的一些视频将会教授你这个项目需要的所有技能。
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody Video Course</a> (14 hours)
|
||||
<a href='https://www.freecodecamp.org/news/python-for-everybody/'>Python for Everybody 视频课程</a>(14 小时)
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python Video Course</a> (2 hours)
|
||||
<a href='https://www.freecodecamp.org/news/learn-python-basics-in-depth-video-course/'>Learn Python 视频课程</a>(2 小时)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
# --hints--
|
||||
|
||||
It should correctly add times and pass all tests.
|
||||
它应该能正确地添加时间并通过所有测试。
|
||||
|
||||
```js
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a24c314108439a4d4036160
|
||||
title: Define an HTML Class in JSX
|
||||
title: Define una clase HTML en JSX
|
||||
challengeType: 6
|
||||
forumTopicId: 301393
|
||||
dashedName: define-an-html-class-in-jsx
|
||||
@ -8,27 +8,27 @@ dashedName: define-an-html-class-in-jsx
|
||||
|
||||
# --description--
|
||||
|
||||
Now that you're getting comfortable writing JSX, you may be wondering how it differs from HTML.
|
||||
Ahora que te sientes cómodo escribiendo JSX, te preguntarás cuanto difiere de HTML.
|
||||
|
||||
So far, it may seem that HTML and JSX are exactly the same.
|
||||
Hasta ahora, puede parecer que HTML y JSX son exactamente iguales.
|
||||
|
||||
One key difference in JSX is that you can no longer use the word `class` to define HTML classes. This is because `class` is a reserved word in JavaScript. Instead, JSX uses `className`.
|
||||
Una diferencia clave en JSX es que ya no puedes usar la palabra `class` para definir clases HTML. Esto es debido a que `class` es una palabra reservada en JavaScript. En su lugar, JSX utiliza `className`.
|
||||
|
||||
In fact, the naming convention for all HTML attributes and event references in JSX become camelCase. For example, a click event in JSX is `onClick`, instead of `onclick`. Likewise, `onchange` becomes `onChange`. While this is a subtle difference, it is an important one to keep in mind moving forward.
|
||||
De hecho, la convención de nomenclatura para todos los atributos HTML y referencias a eventos en JSX se convierte a camelCase. Por ejemplo, un evento de clic en JSX es `onClick`, en lugar de `onclick`. Del mismo modo, `onchange` se convierte en `onChange`. Si bien se trata de una diferencia sutil, es importante tenerlo en cuenta de ahora en adelante.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Apply a class of `myDiv` to the `div` provided in the JSX code.
|
||||
Aplica una clase `myDiv` al `div` proporcionado en el código JSX.
|
||||
|
||||
# --hints--
|
||||
|
||||
The constant `JSX` should return a `div` element.
|
||||
La constante `JSX` debe devolver un elemento `div`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(JSX.type, 'div');
|
||||
```
|
||||
|
||||
The `div` should have a class of `myDiv`.
|
||||
`div` debe tener una clase `myDiv`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(JSX.props.className, 'myDiv');
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: bd7168d8c242eddfaeb5bd13
|
||||
title: Visualize Data with a Bar Chart
|
||||
title: Visualizzare i dati con un grafico a barre
|
||||
challengeType: 3
|
||||
forumTopicId: 301464
|
||||
dashedName: visualize-data-with-a-bar-chart
|
||||
@ -8,43 +8,43 @@ dashedName: visualize-data-with-a-bar-chart
|
||||
|
||||
# --description--
|
||||
|
||||
**Objective:** Build a [CodePen.io](https://codepen.io) app that is functionally similar to this: <https://codepen.io/freeCodeCamp/full/GrZVaM>.
|
||||
**Obiettivo:** Costruisci un'app su [CodePen.io](https://codepen.io) che sia funzionalmente simile a questa: <https://codepen.io/freeCodeCamp/full/GrZVaM>.
|
||||
|
||||
Fulfill the below [user stories](https://en.wikipedia.org/wiki/User_story) and get all of the tests to pass. Give it your own personal style.
|
||||
Soddisfa le seguenti [user story](https://en.wikipedia.org/wiki/User_story) e fai in modo che tutti i test passino. Dagli il tuo stile personale.
|
||||
|
||||
You can use HTML, JavaScript, CSS, and the D3 svg-based visualization library. The tests require axes to be generated using the D3 axis property, which automatically generates ticks along the axis. These ticks are required for passing the D3 tests because their positions are used to determine alignment of graphed elements. You will find information about generating axes at <https://github.com/d3/d3/blob/master/API.md#axes-d3-axis>. Required (non-virtual) DOM elements are queried on the moment of each test. If you use a frontend framework (like Vue for example), the test results may be inaccurate for dynamic content. We hope to accommodate them eventually, but these frameworks are not currently supported for D3 projects.
|
||||
Puoi usare HTML, JavaScript, CSS e la libreria di visualizzazione basata su svg D3. I test richiedono la generazione degli assi con la proprietà axis di D3, che crea automaticamente le tacche sugli assi. Queste tacche sono richieste per superare i test perché la loro posizione è usata per determinale l'allineamento degli elementi del grafico. Puoi trovare informazioni su come generare gli assi su <https://github.com/d3/d3/blob/master/API.md#axes-d3-axis>. Gli elementi del DOM (non-virtuale) richiesti sono selezionati al momento di ogni test. Se usi un framework frontend (come Vue per esempio) i risultati dei test potrebbero essere inaccurati per il contenuto dinamico. Speriamo di supportarli prima o poi, ma al momento non lo sono per i progetti D3.
|
||||
|
||||
**User Story #1:** My chart should have a title with a corresponding `id="title"`.
|
||||
**User Story #1:** Il mio grafico dovrebbe avere un titolo con corrispondente `id="title"`.
|
||||
|
||||
**User Story #2:** My chart should have a `g` element x-axis with a corresponding `id="x-axis"`.
|
||||
**User Story #2:** Il mio grafico dovrebbe avere un elemento x-axis `g` con un corrispondente `id="x-axis"`.
|
||||
|
||||
**User Story #3:** My chart should have a `g` element y-axis with a corresponding `id="y-axis"`.
|
||||
**User Story #3:** Il mio grafico dovrebbe avere un elemento y-axis `g` con un corrispondente `id="y-axis"`.
|
||||
|
||||
**User Story #4:** Both axes should contain multiple tick labels, each with a corresponding `class="tick"`.
|
||||
**User Story #4:** I due assi dovrebbero avere etichette multiple per le tacche ognuna con una corrispondente `class="tick"`.
|
||||
|
||||
**User Story #5:** My chart should have a `rect` element for each data point with a corresponding `class="bar"` displaying the data.
|
||||
**User Story #5:** Il mio grafico dovrebbe avere un elemento `rect` che mostra i dati di ogni data point con una corrispondente `class="bar"`.
|
||||
|
||||
**User Story #6:** Each bar should have the properties `data-date` and `data-gdp` containing `date` and `GDP` values.
|
||||
**User Story #6:** Ogni bar dovrebbe avere le proprietà `data-date` e `data-gdp` contenenti i valori `date` e `GDP`.
|
||||
|
||||
**User Story #7:** The bar elements' `data-date` properties should match the order of the provided data.
|
||||
**User Story #7:** Le proprietà `data-date` degli elementi bar dovrebbero corrispondere all'ordine dei dati messi a disposizione.
|
||||
|
||||
**User Story #8:** The bar elements' `data-gdp` properties should match the order of the provided data.
|
||||
**User Story #8:** Le proprietà `data-gdp` degli elementi bar dovrebbero corrispondere all'ordine dei dati messi a disposizione.
|
||||
|
||||
**User Story #9:** Each bar element's height should accurately represent the data's corresponding `GDP`.
|
||||
**User Story #9:** L'altezza di ogni barra dovrebbe rappresentare accuratamente il corrispondente dato `GDP`.
|
||||
|
||||
**User Story #10:** The `data-date` attribute and its corresponding bar element should align with the corresponding value on the x-axis.
|
||||
**User Story #10:** L'attributo `data-date` e il suo corrispondente elemento bar dovrebbero allinearsi con il corrispondente valore dell'asse x.
|
||||
|
||||
**User Story #11:** The `data-gdp` attribute and its corresponding bar element should align with the corresponding value on the y-axis.
|
||||
**User Story #11:** L'attributo `data-gdp` e il suo corrispondente elemento bar dovrebbero allinerasi con il corrispondente valore dell'asse y.
|
||||
|
||||
**User Story #12:** I can mouse over an area and see a tooltip with a corresponding `id="tooltip"` which displays more information about the area.
|
||||
**User Story #12:** Posso passare con il mouse su un'area e vedere un tooltip con un corrispondente `id="tooltip"` che mostra maggiori informazioni sull'area.
|
||||
|
||||
**User Story #13:** My tooltip should have a `data-date` property that corresponds to the `data-date` of the active area.
|
||||
**User Story #13:** Il mio tooltip dovrebbe avere una proprietà `data-date` che corrisponde al `data-date` dell'area attiva.
|
||||
|
||||
Here is the dataset you will need to complete this project: `https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/GDP-data.json`
|
||||
Ecco i dati che dovrai utilizzare per completare il progetto: `https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/GDP-data.json`
|
||||
|
||||
You can build your project by <a href='https://codepen.io/pen?template=MJjpwO' target='_blank' rel='nofollow'>using this CodePen template</a> and clicking `Save` to create your own pen. Or you can use this CDN link to run the tests in any environment you like: `https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js`.
|
||||
Puoi costruire il tuo progetto <a href='https://codepen.io/pen?template=MJjpwO' target='_blank' rel='nofollow'>usando questo modello CodePen</a> e facendo click su `Save` per creare il tuo pen. Oppure puoi usare questo link CDN per eseguire i test in qualsiasi ambiente tu voglia: `https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js`.
|
||||
|
||||
Once you're done, submit the URL to your working project with all its tests passing.
|
||||
Una volta fatto, invia l'URL del tuo progetto di lavoro con tutti i suoi test superati.
|
||||
|
||||
# --solutions--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7fa6367417b2b2512bbf
|
||||
title: Visualize Data with a Choropleth Map
|
||||
title: Visualizzare i dati con una mappa coropletica
|
||||
challengeType: 3
|
||||
forumTopicId: 301465
|
||||
dashedName: visualize-data-with-a-choropleth-map
|
||||
@ -8,42 +8,42 @@ dashedName: visualize-data-with-a-choropleth-map
|
||||
|
||||
# --description--
|
||||
|
||||
**Objective:** Build a [CodePen.io](https://codepen.io) app that is functionally similar to this: <https://codepen.io/freeCodeCamp/full/EZKqza>.
|
||||
**Obiettivo:** Costruisci un'app [CodePen.io](https://codepen.io) funzionalmente simile a questa: <https://codepen.io/freeCodeCamp/full/EZKqza>.
|
||||
|
||||
Fulfill the below [user stories](https://en.wikipedia.org/wiki/User_story) and get all of the tests to pass. Give it your own personal style.
|
||||
Soddisfa le seguenti [user story](https://en.wikipedia.org/wiki/User_story) e fai in modo che tutti i test siano superati. Dalle il tuo stile personale.
|
||||
|
||||
You can use HTML, JavaScript, CSS, and the D3 svg-based visualization library. Required (non-virtual) DOM elements are queried on the moment of each test. If you use a frontend framework (like Vue for example), the test results may be inaccurate for dynamic content. We hope to accommodate them eventually, but these frameworks are not currently supported for D3 projects.
|
||||
Puoi usare HTML, JavaScript, CSS e la libreria di visualizzazione basata su svg D3. Gli elementi del DOM (non-virtuale) richiesti sono selezionati al momento di ogni test. Se usi un framework frontend (come Vue per esempio) i risultati dei test potrebbero essere inaccurati per il contenuto dinamico. Speriamo di supportarli prima o poi, ma questi framework non sono supportati al momento per i progetti D3.
|
||||
|
||||
**User Story #1:** My choropleth should have a title with a corresponding `id="title"`.
|
||||
**User Story #1:** La mia mappa coropletica dovrebbe avere un titolo con corrispondente `id="title"`.
|
||||
|
||||
**User Story #2:** My choropleth should have a description element with a corresponding `id="description"`.
|
||||
**User Story #2:** La mia mappa coropletica dovrebbe avere un elemento descrittivo con un corrispondente `id="description"`.
|
||||
|
||||
**User Story #3:** My choropleth should have counties with a corresponding `class="county"` that represent the data.
|
||||
**User Story #3:** La mia mappa coropletica dovrebbe avere le contee con una classe `class="county"` corrispondente.
|
||||
|
||||
**User Story #4:** There should be at least 4 different fill colors used for the counties.
|
||||
**User Story #4:** Dovrebbero essere usati almeno 4 colori di riempimento diversi per le contee.
|
||||
|
||||
**User Story #5:** My counties should each have `data-fips` and `data-education` properties containing their corresponding `fips` and `education` values.
|
||||
**User Story #5:** Le mie contee dovrebbero avere le proprietà `data-fips` e `data-education` contenenti i loro valori corrispondenti `fips` e `education`.
|
||||
|
||||
**User Story #6:** My choropleth should have a county for each provided data point.
|
||||
**User Story #6:** La mia mappa coropletica dovrebbe avere una contea per ogni data point fornito.
|
||||
|
||||
**User Story #7:** The counties should have `data-fips` and `data-education` values that match the sample data.
|
||||
**User Story #7:** Le contee dovrebbero avere valori `data-fips` e `data-education` che corrispondono ai dati del campione.
|
||||
|
||||
**User Story #8:** My choropleth should have a legend with a corresponding `id="legend"`.
|
||||
**User Story #8:** La mia mappa coropletica dovrebbe avere una legenda con corrispondente `id="legend"`.
|
||||
|
||||
**User Story #9:** There should be at least 4 different fill colors used for the legend.
|
||||
**User Story #9:** Dovrebbero essere usati almeno 4 colori di riempimento diversi per la legenda.
|
||||
|
||||
**User Story #10:** I can mouse over an area and see a tooltip with a corresponding `id="tooltip"` which displays more information about the area.
|
||||
**User Story #10:** Posso passare con il mouse su un'area e vedere un suggerimento con un corrispondente `id="tooltip"` che mostra maggiori informazioni sull'area.
|
||||
|
||||
**User Story #11:** My tooltip should have a `data-education` property that corresponds to the `data-education` of the active area.
|
||||
**User Story #11:** Il mio suggerimento dovrebbe avere una proprietà `data-education` che corrisponde alla `data-education` dell'area attiva.
|
||||
|
||||
Here are the datasets you will need to complete this project:
|
||||
Ecco i set di dati necessari per completare questo progetto:
|
||||
|
||||
- **US Education Data:**`https://cdn.freecodecamp.org/testable-projects-fcc/data/choropleth_map/for_user_education.json`
|
||||
- **US County Data:**`https://cdn.freecodecamp.org/testable-projects-fcc/data/choropleth_map/counties.json`
|
||||
- **Dati sull'educazione negli Stati Uniti:**`https://cdn.freecodecamp.org/testable-projects-fcc/data/choropleth_map/for_user_education.json`
|
||||
- **Dati sull'educazione nelle contee degli Stati Uniti:**`https://cdn.freecodecamp.org/testable-projects-fcc/data/choropleth_map/counties.json`
|
||||
|
||||
You can build your project by <a href='https://codepen.io/pen?template=MJjpwO' target='_blank' rel='nofollow'>using this CodePen template</a> and clicking `Save` to create your own pen. Or you can use this CDN link to run the tests in any environment you like: `https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js`
|
||||
Puoi costruire il tuo progetto <a href='https://codepen.io/pen?template=MJjpwO' target='_blank' rel='nofollow'>usando questo modello CodePen</a> e facendo click su `Save` per creare il tuo pen. Oppure puoi usare questo link CDN per eseguire i test in qualsiasi ambiente tu voglia: `https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js`
|
||||
|
||||
Once you're done, submit the URL to your working project with all its tests passing.
|
||||
Una volta fatto, invia l'URL del tuo progetto di lavoro con tutti i suoi test superati.
|
||||
|
||||
# --solutions--
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7fa6367417b2b2512bc2
|
||||
title: Add Document Elements with D3
|
||||
title: Aggiungere elementi a un documento con D3
|
||||
challengeType: 6
|
||||
forumTopicId: 301474
|
||||
dashedName: add-document-elements-with-d3
|
||||
@ -8,23 +8,23 @@ dashedName: add-document-elements-with-d3
|
||||
|
||||
# --description--
|
||||
|
||||
D3 has several methods that let you add and change elements in your document.
|
||||
D3 ha diversi metodi che consentono di aggiungere e modificare elementi nel documento.
|
||||
|
||||
The `select()` method selects one element from the document. It takes an argument for the name of the element you want and returns an HTML node for the first element in the document that matches the name. Here's an example:
|
||||
Il metodo `select()` seleziona un elemento del documento. Esso richiede un argomento per il nome dell'elemento che si desidera e restituisce un nodo HTML per il primo elemento del documento che corrisponde a quel nome. Ecco un esempio:
|
||||
|
||||
```js
|
||||
const anchor = d3.select("a");
|
||||
```
|
||||
|
||||
The above example finds the first anchor tag on the page and saves an HTML node for it in the variable `anchor`. You can use the selection with other methods. The `d3` part of the example is a reference to the D3 object, which is how you access D3 methods.
|
||||
L'esempio precedente trova il primo tag di ancoraggio sulla pagina e salva un nodo HTML nella variabile `anchor`. È possibile utilizzare la selezione con altri metodi. La parte `d3` dell'esempio è un riferimento all'oggetto D3, che è il modo usato per accedere ai metodi D3.
|
||||
|
||||
Two other useful methods are `append()` and `text()`.
|
||||
Altri due metodi utili sono `append()` e `text()`.
|
||||
|
||||
The `append()` method takes an argument for the element you want to add to the document. It appends an HTML node to a selected item, and returns a handle to that node.
|
||||
Il metodo `append()` richiede un argomento per l'elemento che si desidera aggiungere al documento. Esso aggiunge un nodo HTML a un elemento selezionato e restituisce un handle (un appiglio) a quel nodo.
|
||||
|
||||
The `text()` method either sets the text of the selected node, or gets the current text. To set the value, you pass a string as an argument inside the parentheses of the method.
|
||||
Il metodo `text()` imposta il testo del nodo selezionato, o ottiene il testo corrente. Per impostare il valore, si passa una stringa come argomento all'interno delle parentesi del metodo.
|
||||
|
||||
Here's an example that selects an unordered list, appends a list item, and adds text:
|
||||
Ecco un esempio che seleziona una lista non ordinata, aggiunge un elemento alla lista e aggiunge del testo:
|
||||
|
||||
```js
|
||||
d3.select("ul")
|
||||
@ -32,45 +32,45 @@ d3.select("ul")
|
||||
.text("Very important item");
|
||||
```
|
||||
|
||||
D3 allows you to chain several methods together with periods to perform a number of actions in a row.
|
||||
D3 consente di concatenare diversi metodi tra loro con dei punti per eseguire un certo numero di azioni in una stessa riga.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Use the `select` method to select the `body` tag in the document. Then `append` an `h1` tag to it, and add the text `Learning D3` into the `h1` element.
|
||||
Usa il metodo `select` per selezionare il tag `body` nel documento. Quindi aggiungi ad esso (`append`) un tag `h1` e aggiungi il testo `Learning D3` nell'elemento `h1`.
|
||||
|
||||
# --hints--
|
||||
|
||||
The `body` should have one `h1` element.
|
||||
Il `body` dovrebbe avere un elemento `h1`.
|
||||
|
||||
```js
|
||||
assert($('body').children('h1').length == 1);
|
||||
```
|
||||
|
||||
The `h1` element should have the text `Learning D3` in it.
|
||||
L'elemento `h1` dovrebbe contenere il testo `Learning D3`.
|
||||
|
||||
```js
|
||||
assert($('h1').text() == 'Learning D3');
|
||||
```
|
||||
|
||||
Your code should access the `d3` object.
|
||||
Il tuo codice dovrebbe accedere all'oggetto `d3`.
|
||||
|
||||
```js
|
||||
assert(code.match(/d3/g));
|
||||
```
|
||||
|
||||
Your code should use the `select` method.
|
||||
Il tuo codice dovrebbe utilizzare il metodo `select`.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.select/g));
|
||||
```
|
||||
|
||||
Your code should use the `append` method.
|
||||
Il tuo codice dovrebbe utilizzare il metodo `append`.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.append/g));
|
||||
```
|
||||
|
||||
Your code should use the `text` method.
|
||||
Il tuo codice dovrebbe usare il metodo `text`.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.text/g));
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7fa7367417b2b2512bc7
|
||||
title: Change Styles Based on Data
|
||||
title: Cambiare lo stile in base ai dati
|
||||
challengeType: 6
|
||||
forumTopicId: 301479
|
||||
dashedName: change-styles-based-on-data
|
||||
@ -8,9 +8,9 @@ dashedName: change-styles-based-on-data
|
||||
|
||||
# --description--
|
||||
|
||||
D3 is about visualization and presentation of data. It's likely you'll want to change the styling of elements based on the data. You can use a callback function in the `style()` method to change the styling for different elements.
|
||||
D3 riguarda la visualizzazione e la presentazione dei dati. È probabile che tu voglia cambiare lo stile degli elementi in base ai dati. È possibile utilizzare una funzione di callback nel metodo `style()` per cambiare lo stile di diversi elementi.
|
||||
|
||||
For example, you may want to color a data point blue if it has a value less than 20, and red otherwise. You can use a callback function in the `style()` method and include the conditional logic. The callback function uses the `d` parameter to represent the data point:
|
||||
Ad esempio, potresti voler rendere blu un punto dati se ha un valore inferiore a 20, e rosso altrimenti. Puoi usare una funzione di callback nel metodo `style()` e includere la logica condizionale. La funzione callback utilizza il parametro `d` per rappresentare il punto dati:
|
||||
|
||||
```js
|
||||
selection.style("color", (d) => {
|
||||
@ -18,65 +18,65 @@ selection.style("color", (d) => {
|
||||
});
|
||||
```
|
||||
|
||||
The `style()` method is not limited to setting the `color` - it can be used with other CSS properties as well.
|
||||
Il metodo `style()` non si limita a impostare il `color` - può essere utilizzato anche con altre proprietà CSS.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Add the `style()` method to the code in the editor to set the `color` of the `h2` elements conditionally. Write the callback function so if the data value is less than 20, it returns red, otherwise it returns green.
|
||||
Aggiungi il metodo `style()` al codice nell'editor per impostare il `color` dell'elemento `h2` con la logica condizionale. Scrivi la funzione di callback in modo tale che se il valore dei dati è inferiore a 20, restituisca rosso, altrimenti restituisca verde.
|
||||
|
||||
**Note:** You can use if-else logic, or the ternary operator.
|
||||
**Nota:** È possibile utilizzare la logica if-else o l'operatore ternario.
|
||||
|
||||
# --hints--
|
||||
|
||||
The first `h2` should have a `color` of red.
|
||||
Il primo `h2` dovrebbe avere un `color` rosso.
|
||||
|
||||
```js
|
||||
assert($('h2').eq(0).css('color') == 'rgb(255, 0, 0)');
|
||||
```
|
||||
|
||||
The second `h2` should have a `color` of green.
|
||||
Il secondo `h2` dovrebbe avere un `color` verde.
|
||||
|
||||
```js
|
||||
assert($('h2').eq(1).css('color') == 'rgb(0, 128, 0)');
|
||||
```
|
||||
|
||||
The third `h2` should have a `color` of green.
|
||||
Il terzo `h2` dovrebbe avere un `color` verde.
|
||||
|
||||
```js
|
||||
assert($('h2').eq(2).css('color') == 'rgb(0, 128, 0)');
|
||||
```
|
||||
|
||||
The fourth `h2` should have a `color` of red.
|
||||
Il quarto `h2` dovrebbe avere un `color` rosso.
|
||||
|
||||
```js
|
||||
assert($('h2').eq(3).css('color') == 'rgb(255, 0, 0)');
|
||||
```
|
||||
|
||||
The fifth `h2` should have a `color` of green.
|
||||
Il quinto `h2` dovrebbe avere un `color` verde.
|
||||
|
||||
```js
|
||||
assert($('h2').eq(4).css('color') == 'rgb(0, 128, 0)');
|
||||
```
|
||||
|
||||
The sixth `h2` should have a `color` of red.
|
||||
Il sesto `h2` dovrebbe avere un `color` rosso.
|
||||
|
||||
```js
|
||||
assert($('h2').eq(5).css('color') == 'rgb(255, 0, 0)');
|
||||
```
|
||||
|
||||
The seventh `h2` should have a `color` of green.
|
||||
Il settimo `h2` dovrebbe avere un `color` verde.
|
||||
|
||||
```js
|
||||
assert($('h2').eq(6).css('color') == 'rgb(0, 128, 0)');
|
||||
```
|
||||
|
||||
The eighth `h2` should have a `color` of red.
|
||||
L'ottavo `h2` dovrebbe avere un `color` rosso.
|
||||
|
||||
```js
|
||||
assert($('h2').eq(7).css('color') == 'rgb(255, 0, 0)');
|
||||
```
|
||||
|
||||
The ninth `h2` should have a `color` of red.
|
||||
Il nono `h2` dovrebbe avere un `color` rosso.
|
||||
|
||||
```js
|
||||
assert($('h2').eq(8).css('color') == 'rgb(255, 0, 0)');
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7fab367417b2b2512bd7
|
||||
title: Create a Scatterplot with SVG Circles
|
||||
title: Creare un diagramma a dispersione con cerchi SVG
|
||||
challengeType: 6
|
||||
forumTopicId: 301484
|
||||
dashedName: create-a-scatterplot-with-svg-circles
|
||||
@ -8,19 +8,19 @@ dashedName: create-a-scatterplot-with-svg-circles
|
||||
|
||||
# --description--
|
||||
|
||||
A scatter plot is another type of visualization. It usually uses circles to map data points, which have two values each. These values tie to the `x` and `y` axes, and are used to position the circle in the visualization.
|
||||
Un grafico a dispersione è un altro tipo di visualizzazione. Di solito usa i cerchi per mappare i punti dati, e ogni cerchio ha bisogno di due valori. Questi valori si legano agli assi `x` e `y`, e vengono utilizzati per posizionare il cerchio nella visualizzazione.
|
||||
|
||||
SVG has a `circle` tag to create the circle shape. It works a lot like the `rect` elements you used for the bar chart.
|
||||
SVG ha un tag `circle` per creare la forma del cerchio. Funziona in modo simile agli elementi `rect` che hai usato per il grafico a barre.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Use the `data()`, `enter()`, and `append()` methods to bind `dataset` to new `circle` elements that are appended to the SVG canvas.
|
||||
Usa i metodi `data()`, `enter()`, e `append()` per associare il `dataset` ai nuovi elementi `circle` che sono aggiunti alla tela SVG.
|
||||
|
||||
**Note:** The circles won't be visible because we haven't set their attributes yet. We'll do that in the next challenge.
|
||||
**Nota:** I cerchi non saranno visibili perché non abbiamo ancora impostato i loro attributi. Lo faremo nella prossima sfida.
|
||||
|
||||
# --hints--
|
||||
|
||||
Your code should have 10 `circle` elements.
|
||||
Il tuo codice dovrebbe avere 10 elementi `circle`.
|
||||
|
||||
```js
|
||||
assert($('circle').length == 10);
|
||||
|
Reference in New Issue
Block a user