mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-30 03:03:06 -05:00
chore(i18n,learn): processed translations (#51880)
This commit is contained in:
@@ -19,7 +19,7 @@ Colors have several characteristics including hue, saturation, and lightness. CS
|
||||
|
||||
Here are a few examples of using `hsl()` with fully-saturated, normal lightness colors:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Color</th><th>HSL</th></tr></thead><tbody><tr><td>red</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>yellow</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>green</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>cyan</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>blue</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>magenta</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Color</th><th>HSL</th></tr></thead><tbody><tr><td>red</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>yellow</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>green</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>cyan</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>blue</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>magenta</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ There are various methods of selecting different colors that result in a harmoni
|
||||
|
||||
Here are three colors created using the split-complement scheme:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Color</th><th>Hex Code</th></tr></thead><thead></thead><tbody><tr><td>orange</td><td>#FF7F00</td></tr><tr><td>cyan</td><td>#00FFFF</td></tr><tr><td>raspberry</td><td>#FF007F</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Color</th><th>Hex Code</th></tr></thead><thead></thead><tbody><tr><td>orange</td><td>#FF7F00</td></tr><tr><td>cyan</td><td>#00FFFF</td></tr><tr><td>raspberry</td><td>#FF007F</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ The `text-transform` property in CSS is used to change the appearance of text. I
|
||||
|
||||
The following table shows how the different `text-transform`values change the example text "Transform me".
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Value</th><th>Result</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"transform me"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORM ME"</td></tr><tr><td><code>capitalize</code></td><td>"Transform Me"</td></tr><tr><td><code>initial</code></td><td>Use the default value</td></tr><tr><td><code>inherit</code></td><td>Use the <code>text-transform</code> value from the parent element</td></tr><tr><td><code>none</code></td><td><strong>Default:</strong> Use the original text</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Value</th><th>Result</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"transform me"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORM ME"</td></tr><tr><td><code>capitalize</code></td><td>"Transform Me"</td></tr><tr><td><code>initial</code></td><td>Use the default value</td></tr><tr><td><code>inherit</code></td><td>Use the <code>text-transform</code> value from the parent element</td></tr><tr><td><code>none</code></td><td><strong>Default:</strong> Use the original text</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ This reduces the total number of possible colors to around 4,000. But browsers w
|
||||
|
||||
Go ahead, try using the abbreviated hex codes to color the correct elements.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Color</th><th>Short Hex Code</th></tr><tr><td>Cyan</td><td><code>#0FF</code></td></tr><tr><td>Green</td><td><code>#0F0</code></td></tr><tr><td>Red</td><td><code>#F00</code></td></tr><tr><td>Fuchsia</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Color</th><th>Short Hex Code</th></tr><tr><td>Cyan</td><td><code>#0FF</code></td></tr><tr><td>Green</td><td><code>#0F0</code></td></tr><tr><td>Red</td><td><code>#F00</code></td></tr><tr><td>Fuchsia</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ The digit `F` is the highest number in hex code, and represents the maximum poss
|
||||
|
||||
Replace the color words in our `style` element with their correct hex codes.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Color</th><th>Hex Code</th></tr><tr><td>Dodger Blue</td><td><code>#1E90FF</code></td></tr><tr><td>Green</td><td><code>#00FF00</code></td></tr><tr><td>Orange</td><td><code>#FFA500</code></td></tr><tr><td>Red</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Color</th><th>Hex Code</th></tr><tr><td>Dodger Blue</td><td><code>#1E90FF</code></td></tr><tr><td>Green</td><td><code>#00FF00</code></td></tr><tr><td>Orange</td><td><code>#FFA500</code></td></tr><tr><td>Red</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Just like with hex code, you can mix colors in RGB by using combinations of diff
|
||||
|
||||
Replace the hex codes in our `style` element with their correct RGB values.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Color</th><th>RGB</th></tr><tr><td>Blue</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>Red</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>Orchid</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>Sienna</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Color</th><th>RGB</th></tr><tr><td>Blue</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>Red</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>Orchid</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>Sienna</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: counting-cards
|
||||
|
||||
يكون وجود المزيد من الورق عالي القيمة المتبقي في المجموعة, أفضل للاعب. يتم تعيين قيمة لكل ورقة لعب وفقاً للجدول بالأدنى. عندما يكون العد موجبًا، يجب على اللاعب المراهنة بشكل مرتفع. عندما يكون العد صفرًا أو سلبيًا، يجب أن يراهن اللاعب بشكل منخفض.
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>تغيير العد</th><th>الأوراق</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
<table><thead><tr><th>تغيير العد</th><th>الأوراق</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
|
||||
سوف تكتب وظيفة لعد الورق. سوف تتلقى وسيط (parameter) اسمه `card`, الذي يمكن أن يكون رقما أو مقطع نصي (string)، وسوف تزيد أو تخفض متغير `count` وفقا لقيمة الورقة المعطى (انظر إلى الجدول). ثم ستقوم الوظيفة بإنشاء مقطع نصي يحتوي علي العد الحالي وكلمة `Bet` إذا كان العد إيجابياً، أو `Hold` إذا كان العد صفر أو سلبي. يجب أن يفصل العد الحالي وقرار اللاعب (`Bet` أو `Hold`) بمسافة فارعة واحدة.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: escape-sequences-in-strings
|
||||
|
||||
الاقتباسات (quotes) ليست الرموز الوحيدة التي يمكن أن تكتب <dfn>مخرَّجة</dfn> (escaped) داخل مقطع نصي (string). تتيح لك escape sequences استخدام الرموز التي لا تمكن استعمالها في مقطع ما بدونهم.
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>الكود</th><th>الناتج</th></tr></thead><tbody><tr><td><code>\'</code></td><td>single quote</td></tr><tr><td><code>\"</code></td><td>double quote</td></tr><tr><td><code>\\</code></td><td>backslash</td></tr><tr><td><code>\n</code></td><td>newline</td></tr><tr><td><code>\t</code></td><td>tab</td></tr><tr><td><code>\r</code></td><td>carriage return</td></tr><tr><td><code>\b</code></td><td>backspace</td></tr><tr><td><code>\f</code></td><td>form feed</td></tr></tbody></table>
|
||||
<table><thead><tr><th>الكود</th><th>الناتج</th></tr></thead><tbody><tr><td><code>\'</code></td><td>single quote</td></tr><tr><td><code>\"</code></td><td>double quote</td></tr><tr><td><code>\\</code></td><td>backslash</td></tr><tr><td><code>\n</code></td><td>newline</td></tr><tr><td><code>\t</code></td><td>tab</td></tr><tr><td><code>\r</code></td><td>carriage return</td></tr><tr><td><code>\b</code></td><td>backspace</td></tr><tr><td><code>\f</code></td><td>form feed</td></tr></tbody></table>
|
||||
|
||||
*لاحظ أن يجب أن يكون الخط المائل (backslash) نفسه يخرَّج (escaped) ليتم عرضه كخط مائل backslash.*
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: golf-code
|
||||
|
||||
سيمرر `par` و `strokes` كمعطيات (arguments) لوظيفتك (function). أرجع المقطع الصحيح وفقًا لهذا الجدول الذي يسرد strokes حسب الأولوية؛ من الأعلى إلى الأسفل:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Strokes</th><th>Return</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Strokes</th><th>Return</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
|
||||
يكونان `par` و `strokes` دائما من نوع رَقم إيجابي. لقد أضفنا القائمة من جميع الأسماء لمساعدتك.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ dashedName: cash-register
|
||||
|
||||
خلاف ذلك، قم بإرجاع `{status: "OPEN", change: [...]}`، مع الباقي المستحق من العملات المعدنية والورقية، مرتبة من الأعلى إلى الأدنى، كقيمة للمفتاح `change`.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>وحدة العملة</th><th>المبلغ</th></tr><tr><td>Penny</td><td>$0.01 (PENNY)</td></tr><tr><td>Nickel</td><td>$0.05 (NICKEL)</td></tr><tr><td>Dime</td><td>$0.1 (DIME)</td></tr><tr><td>Quarter</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dollar</td><td>$1 (ONE)</td></tr><tr><td>Five Dollars</td><td>$5 (FIVE)</td></tr><tr><td>Ten Dollars</td><td>$10 (TEN)</td></tr><tr><td>Twenty Dollars</td><td>$20 (TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>$100 (ONE HUNDRED)</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>وحدة العملة</th><th>المبلغ</th></tr><tr><td>Penny</td><td>$0.01 (PENNY)</td></tr><tr><td>Nickel</td><td>$0.05 (NICKEL)</td></tr><tr><td>Dime</td><td>$0.1 (DIME)</td></tr><tr><td>Quarter</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dollar</td><td>$1 (ONE)</td></tr><tr><td>Five Dollars</td><td>$5 (FIVE)</td></tr><tr><td>Ten Dollars</td><td>$10 (TEN)</td></tr><tr><td>Twenty Dollars</td><td>$20 (TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>$100 (ONE HUNDRED)</td></tr></tbody></table>
|
||||
|
||||
انظر أدناه للحصول على مثال لـ cash-in-drawer array:
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
النقر على عنصر الزر يجب أن يغير خاصية `visibility` في الحالة (state) بين `true` و `false`.
|
||||
Clicking the button element should toggle the `visibility` property in state between `true` and `false` and conditionally render the `h1` element.
|
||||
|
||||
```js
|
||||
(() => {
|
||||
@@ -76,11 +76,11 @@ assert.strictEqual(
|
||||
};
|
||||
const second = () => {
|
||||
mockedComponent.find('button').simulate('click');
|
||||
return mockedComponent.state('visibility');
|
||||
return mockedComponent.state('visibility') && mockedComponent.find('h1').exists();
|
||||
};
|
||||
const third = () => {
|
||||
mockedComponent.find('button').simulate('click');
|
||||
return mockedComponent.state('visibility');
|
||||
return mockedComponent.state('visibility') && mockedComponent.find('h1').exists();
|
||||
};
|
||||
const firstValue = first();
|
||||
const secondValue = second();
|
||||
|
||||
@@ -13,31 +13,31 @@ dashedName: nest-css-with-sass
|
||||
وعادة ما يكون كل عنصر مستهدفاً على خط مختلف لتصميمه، مثل:
|
||||
|
||||
```scss
|
||||
nav {
|
||||
background-color: red;
|
||||
article {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
list-style: none;
|
||||
article p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
display: inline-block;
|
||||
article ul {
|
||||
color: blue;
|
||||
}
|
||||
```
|
||||
|
||||
بالنسبة لمشروع كبير، سيكون مِلَفّ CSS يحتوي على العديد من الأسطر والقواعد. هنا حيث يمكن للتداخل أن يساعد في تنظيم التعليمات البرمجية الخاصة بك عن طريق وضع قواعد تصميم فرعي ضمن العناصر الرئيسية لكل منهما:
|
||||
|
||||
```scss
|
||||
nav {
|
||||
background-color: red;
|
||||
article {
|
||||
height: 200px;
|
||||
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: issue-tracker
|
||||
Build a full stack JavaScript app that is functionally similar to this: <a href="https://issue-tracker.freecodecamp.rocks/" target="_blank" rel="noopener noreferrer nofollow">https://issue-tracker.freecodecamp.rocks/</a>. Working on this project will involve you writing your code using one of the following methods:
|
||||
|
||||
- Clone <a href="https://github.com/freeCodeCamp/boilerplate-project-issuetracker/" target="_blank" rel="noopener noreferrer nofollow">this GitHub repo</a> and complete your project locally.
|
||||
- Use <a href="https://replit.com/github/freeCodeCamp/boilerplate-project-issuetracker" target="_blank" rel="noopener noreferrer nofollow">this Replit starter project</a> to complete your project.
|
||||
- Use <a href="https://replit.com/github/freeCodeCamp/boilerplate-project-issuetracker" target="_blank" rel="noopener noreferrer nofollow">our Replit starter project</a> to complete your project.
|
||||
- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo.
|
||||
|
||||
If you use Replit, follow these steps to set up the project:
|
||||
|
||||
@@ -84,7 +84,7 @@ The unit tests for this project are in `test_module.py`. We are running the test
|
||||
|
||||
## Submitting
|
||||
|
||||
Copy your project's URL and submit it below.
|
||||
Copy your project's URL and submit it to freeCodeCamp.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ You will be <a href="https://replit.com/github/freeCodeCamp/boilerplate-mean-var
|
||||
|
||||
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:
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a>(14 hours)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">How to Analyze Data with Python Pandas</a> (10 hours)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ You will be <a href="https://replit.com/github/freeCodeCamp/boilerplate-medical-
|
||||
|
||||
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:
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a>(14 hours)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">How to Analyze Data with Python Pandas</a> (10 hours)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ You will be <a href="https://replit.com/github/freeCodeCamp/boilerplate-page-vie
|
||||
|
||||
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:
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a>(14 hours)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">How to Analyze Data with Python Pandas</a> (10 hours)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ You will be <a href="https://replit.com/github/freeCodeCamp/boilerplate-sea-leve
|
||||
|
||||
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:
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a>(14 hours)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">How to Analyze Data with Python Pandas</a> (10 hours)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ However, in the world of high performance and different element types, sometimes
|
||||
|
||||
<dfn>Typed arrays</dfn> are the answer to this problem. You are now able to say how much memory you want to give an array. Below is a basic overview of the different types of arrays available and the size in bytes for each element in that array.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Type</th><th>Each element size in bytes</th></tr><tr><td><code>Int8Array</code></td><td>1</td></tr><tr><td><code>Uint8Array</code></td><td>1</td></tr><tr><td><code>Uint8ClampedArray</code></td><td>1</td></tr><tr><td><code>Int16Array</code></td><td>2</td></tr><tr><td><code>Uint16Array</code></td><td>2</td></tr><tr><td><code>Int32Array</code></td><td>4</td></tr><tr><td><code>Uint32Array</code></td><td>4</td></tr><tr><td><code>Float32Array</code></td><td>4</td></tr><tr><td><code>Float64Array</code></td><td>8</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Type</th><th>Each element size in bytes</th></tr><tr><td><code>Int8Array</code></td><td>1</td></tr><tr><td><code>Uint8Array</code></td><td>1</td></tr><tr><td><code>Uint8ClampedArray</code></td><td>1</td></tr><tr><td><code>Int16Array</code></td><td>2</td></tr><tr><td><code>Uint16Array</code></td><td>2</td></tr><tr><td><code>Int32Array</code></td><td>4</td></tr><tr><td><code>Uint32Array</code></td><td>4</td></tr><tr><td><code>Float32Array</code></td><td>4</td></tr><tr><td><code>Float64Array</code></td><td>8</td></tr></tbody></table>
|
||||
|
||||
There are two ways in creating these kind of arrays. One way is to create it directly. Below is how to create a 3 length `Int16Array`.
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ The unit tests for this project are in `test_module.py`. We imported the tests f
|
||||
|
||||
## Submitting
|
||||
|
||||
Copy your project's URL and submit it below.
|
||||
Copy your project's URL and submit it to freeCodeCamp.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Return `{status: "CLOSED", change: [...]}` with cash-in-drawer as the value for
|
||||
|
||||
Otherwise, return `{status: "OPEN", change: [...]}`, with the change due in coins and bills, sorted in highest to lowest order, as the value of the `change` key.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Currency Unit</th><th>Amount</th></tr><tr><td>Penny</td><td>$0.01 (PENNY)</td></tr><tr><td>Nickel</td><td>$0.05 (NICKEL)</td></tr><tr><td>Dime</td><td>$0.1 (DIME)</td></tr><tr><td>Quarter</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dollar</td><td>$1 (ONE)</td></tr><tr><td>Five Dollars</td><td>$5 (FIVE)</td></tr><tr><td>Ten Dollars</td><td>$10 (TEN)</td></tr><tr><td>Twenty Dollars</td><td>$20 (TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>$100 (ONE HUNDRED)</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Currency Unit</th><th>Amount</th></tr><tr><td>Penny</td><td>$0.01 (PENNY)</td></tr><tr><td>Nickel</td><td>$0.05 (NICKEL)</td></tr><tr><td>Dime</td><td>$0.1 (DIME)</td></tr><tr><td>Quarter</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dollar</td><td>$1 (ONE)</td></tr><tr><td>Five Dollars</td><td>$5 (FIVE)</td></tr><tr><td>Ten Dollars</td><td>$10 (TEN)</td></tr><tr><td>Twenty Dollars</td><td>$20 (TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>$100 (ONE HUNDRED)</td></tr></tbody></table>
|
||||
|
||||
See below for an example of a cash-in-drawer array:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ dashedName: adjust-the-hue-of-a-color
|
||||
|
||||
下面是一些使用 `hsl()` 描述顏色的例子,顏色都爲滿飽和度,中等亮度:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>顏色</th><th>HSL</th></tr></thead><tbody><tr><td>紅</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>黃</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>綠</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>藍綠</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>藍</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>品紅</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
<table><thead><tr><th>顏色</th><th>HSL</th></tr></thead><tbody><tr><td>紅</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>黃</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>綠</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>藍綠</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>藍</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>品紅</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ dashedName: learn-about-tertiary-colors
|
||||
|
||||
下面是使用分裂補色搭配法創建的三個顏色:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>顏色</th><th>HEX 顏色碼</th></tr></thead><thead></thead><tbody><tr><td>橙色</td><td>#FF7F00</td></tr><tr><td>藍綠色</td><td>#00FFFF</td></tr><tr><td>樹莓紅</td><td>#FF007F</td></tr></tbody></table>
|
||||
<table><thead><tr><th>顏色</th><th>HEX 顏色碼</th></tr></thead><thead></thead><tbody><tr><td>橙色</td><td>#FF7F00</td></tr><tr><td>藍綠色</td><td>#00FFFF</td></tr><tr><td>樹莓紅</td><td>#FF007F</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ CSS 裏的 `text-transform` 屬性可以改變英文字母的大小寫。 使用
|
||||
|
||||
下面的表格展示了 `text-transform` 的不同值對文字 “Transform me” 的影響:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>值</th><th>結果</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"transform me"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORM ME"</td></tr><tr><td><code>capitalize</code></td><td>"Transform Me"</td></tr><tr><td><code>initial</code></td><td>使用默認值</td></tr><tr><td><code>inherit</code></td><td>使用父元素的 <code>text-transform</code> 值。</td></tr><tr><td><code>none</code></td><td><strong>Default:</strong>不改變文字。</td></tr></tbody></table>
|
||||
<table><thead><tr><th>值</th><th>結果</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"transform me"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORM ME"</td></tr><tr><td><code>capitalize</code></td><td>"Transform Me"</td></tr><tr><td><code>initial</code></td><td>使用默認值</td></tr><tr><td><code>inherit</code></td><td>使用父元素的 <code>text-transform</code> 值。</td></tr><tr><td><code>none</code></td><td><strong>Default:</strong>不改變文字。</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ dashedName: use-abbreviated-hex-code
|
||||
|
||||
接下來,使用縮寫的十六進制編碼給元素設置正確的顏色。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>顏色</th><th>十六進制編碼縮寫形式</th></tr><tr><td>藍綠色</td><td><code>#0FF</code></td></tr><tr><td>綠色</td><td><code>#0F0</code></td></tr><tr><td>紅色</td><td><code>#F00</code></td></tr><tr><td>紫紅色</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>顏色</th><th>十六進制編碼縮寫形式</th></tr><tr><td>藍綠色</td><td><code>#0FF</code></td></tr><tr><td>綠色</td><td><code>#0F0</code></td></tr><tr><td>紅色</td><td><code>#F00</code></td></tr><tr><td>紫紅色</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ dashedName: use-hex-code-to-mix-colors
|
||||
|
||||
把 `style` 標籤裏面的顏色值用正確的十六進制編碼替換。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>顏色</th><th>十六進制編碼</th></tr><tr><td>道奇藍</td><td><code>#1E90FF</code></td></tr><tr><td>綠色</td><td><code>#00FF00</code></td></tr><tr><td>橙色</td><td><code>#FFA500</code></td></tr><tr><td>紅色</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>顏色</th><th>十六進制編碼</th></tr><tr><td>道奇藍</td><td><code>#1E90FF</code></td></tr><tr><td>綠色</td><td><code>#00FF00</code></td></tr><tr><td>橙色</td><td><code>#FFA500</code></td></tr><tr><td>紅色</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ dashedName: use-rgb-to-mix-colors
|
||||
|
||||
將 `style` 標籤裏面中的十六進制編碼替換爲正確的 RGB 值。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>顏色</th><th>RGB</th></tr><tr><td>藍色</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>紅色</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>淡紫色</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>赭黃色</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>顏色</th><th>RGB</th></tr><tr><td>藍色</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>紅色</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>淡紫色</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>赭黃色</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: counting-cards
|
||||
|
||||
牌桌上的大值的卡牌更多,對玩家有利。 根據下面的表格,每張卡牌都被分配了一個值。 如果卡牌的值大於 0,那麼玩家應該追加賭注。 如果卡牌的值爲 0 或負數,玩家應該追加少許賭注甚至不追加賭注。
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>計數</th><th>卡牌</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
<table><thead><tr><th>計數</th><th>卡牌</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
|
||||
請寫一個函數實現 21 點算法。 它根據參數 `card` 的值(見表格,可能是數字或者字符串)來遞增或遞減全局變量 `count`。 然後函數返回一個由當前 count(計數)和 `Bet`(當 count > 0 時)或 `Hold`(當 count <= 0 時) 拼接的字符串。 注意 count(計數)和玩家的決定(`Bet` 或 `Hold`)之間應該有空格。
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: escape-sequences-in-strings
|
||||
|
||||
引號不是字符串中唯一可以被轉義(<dfn>escaped</dfn>)的字符。 轉義字符允許你使用可能無法在字符串中使用的字符。
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>代碼</th><th>輸出</th></tr></thead><tbody><tr><td><code>\'</code></td><td>單引號</td></tr><tr><td><code>\"</code></td><td>雙引號</td></tr><tr><td><code>\\</code></td><td>反斜槓</td></tr><tr><td><code>\n</code></td><td>換行符</td></tr><tr><td><code>\t</code></td><td>製表符</td></tr><tr><td><code>\r</code></td><td>回車</td></tr><tr><td><code>\b</code></td><td>退格符</td></tr><tr><td><code>\f</code></td><td>換頁符</td></tr></tbody></table>
|
||||
<table><thead><tr><th>代碼</th><th>輸出</th></tr></thead><tbody><tr><td><code>\'</code></td><td>單引號</td></tr><tr><td><code>\"</code></td><td>雙引號</td></tr><tr><td><code>\\</code></td><td>反斜槓</td></tr><tr><td><code>\n</code></td><td>換行符</td></tr><tr><td><code>\t</code></td><td>製表符</td></tr><tr><td><code>\r</code></td><td>回車</td></tr><tr><td><code>\b</code></td><td>退格符</td></tr><tr><td><code>\f</code></td><td>換頁符</td></tr></tbody></table>
|
||||
|
||||
*請注意,反斜線本身必須被轉義,才能顯示爲反斜線。*
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: golf-code
|
||||
|
||||
函數將會傳送兩個參數,`par` 和 `strokes`。 根據下表返回正確的字符串。下表列出不同揮杆次數(從高到低)對應的字符串。
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>揮杆次數</th><th>返回字符串</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
<table><thead><tr><th>揮杆次數</th><th>返回字符串</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
|
||||
`par` 和 `strokes` 必須是數字而且是正數。 題目已定義字符串的數組,便於你操作。
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ dashedName: cash-register
|
||||
|
||||
否則,返回 `{status: "OPEN", change: [...]}`,其中 `change` 鍵值是應找回的零錢數,並將找零的面值由高到低排序。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>貨幣單位 Unit</th><th>面值</th></tr><tr><td>Penny</td><td>0.01 美元(PENNY)</td></tr><tr><td>Nickel</td><td>0.05 美元(NICKEL)</td></tr><tr><td>Dime</td><td>0.1 美元(DIME)</td></tr><tr><td>Quarter</td><td>0.25 美元(QUARTER)</td></tr><tr><td>Dollar</td><td>1 美元(ONE)</td></tr><tr><td>Five Dollars</td><td>5 美元(五)</td></tr><tr><td>Ten Dollars</td><td>10 美元(TEN)</td></tr><tr><td>Twenty Dollars</td><td>20 美元(TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>100美元(ONE HUNDRED)</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>貨幣單位 Unit</th><th>面值</th></tr><tr><td>Penny</td><td>0.01 美元(PENNY)</td></tr><tr><td>Nickel</td><td>0.05 美元(NICKEL)</td></tr><tr><td>Dime</td><td>0.1 美元(DIME)</td></tr><tr><td>Quarter</td><td>0.25 美元(QUARTER)</td></tr><tr><td>Dollar</td><td>1 美元(ONE)</td></tr><tr><td>Five Dollars</td><td>5 美元(五)</td></tr><tr><td>Ten Dollars</td><td>10 美元(TEN)</td></tr><tr><td>Twenty Dollars</td><td>20 美元(TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>100美元(ONE HUNDRED)</td></tr></tbody></table>
|
||||
|
||||
下面的抽屜裏現金數組示例:
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
單擊按鈕元素應在 `true` 和 `false` 之間切換 `visibility` 屬性的狀態。
|
||||
Clicking the button element should toggle the `visibility` property in state between `true` and `false` and conditionally render the `h1` element.
|
||||
|
||||
```js
|
||||
(() => {
|
||||
@@ -76,11 +76,11 @@ assert.strictEqual(
|
||||
};
|
||||
const second = () => {
|
||||
mockedComponent.find('button').simulate('click');
|
||||
return mockedComponent.state('visibility');
|
||||
return mockedComponent.state('visibility') && mockedComponent.find('h1').exists();
|
||||
};
|
||||
const third = () => {
|
||||
mockedComponent.find('button').simulate('click');
|
||||
return mockedComponent.state('visibility');
|
||||
return mockedComponent.state('visibility') && mockedComponent.find('h1').exists();
|
||||
};
|
||||
const firstValue = first();
|
||||
const secondValue = second();
|
||||
|
||||
@@ -13,31 +13,31 @@ Sass 允許 CSS 規則的嵌套,這在組織樣式表的時候會很有用。
|
||||
在 CSS 裏,每個元素的樣式都需要寫在獨立的代碼塊中,如下所示:
|
||||
|
||||
```scss
|
||||
nav {
|
||||
background-color: red;
|
||||
article {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
list-style: none;
|
||||
article p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
display: inline-block;
|
||||
article ul {
|
||||
color: blue;
|
||||
}
|
||||
```
|
||||
|
||||
對於一個大型項目,CSS 規則會很複雜。 這時,引入嵌套功能(即在對應的父元素中寫子元素的樣式)可以有效地簡化代碼:
|
||||
|
||||
```scss
|
||||
nav {
|
||||
background-color: red;
|
||||
article {
|
||||
height: 200px;
|
||||
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: issue-tracker
|
||||
構建一個 JavaScript 全棧應用,在功能上與 <a href="https://issue-tracker.freecodecamp.rocks/" target="_blank" rel="noopener noreferrer nofollow">https://issue-tracker.freecodecamp.rocks/</a> 類似。 可以採用下面的任意一種方式完成這個挑戰:
|
||||
|
||||
- 克隆<a href="https://github.com/freeCodeCamp/boilerplate-project-issuetracker/" target="_blank" rel="noopener noreferrer nofollow">這個 GitHub 倉庫</a>,並在本地完成你的項目。
|
||||
- 使用<a href="https://replit.com/github/freeCodeCamp/boilerplate-project-issuetracker" target="_blank" rel="noopener noreferrer nofollow">我們的 Replit 初始化項目</a>來完成你的項目。
|
||||
- Use <a href="https://replit.com/github/freeCodeCamp/boilerplate-project-issuetracker" target="_blank" rel="noopener noreferrer nofollow">our Replit starter project</a> to complete your project.
|
||||
- 使用一個你喜歡的站點生成器來完成項目。 需要確定包含了我們 GitHub 倉庫的所有文件。
|
||||
|
||||
如果你使用 Replit,請按照以下步驟設置項目:
|
||||
|
||||
@@ -84,7 +84,7 @@ arithmetic_arranger(["32 + 8", "1 - 3801", "9999 + 9999", "523 - 49"], True)
|
||||
|
||||
## 提交
|
||||
|
||||
複製項目的 URL 並在下面提交。
|
||||
Copy your project's URL and submit it to freeCodeCamp.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ dashedName: mean-variance-standard-deviation-calculator
|
||||
|
||||
我們仍在開發 Python 課程的交互式教學部分。 目前,你可以在 YouTube 上通過 freeCodeCamp.org 上傳的一些視頻學習這個項目相關的知識。
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">給所有人的 Python 課程</a>(14 小時)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">如何使用 Python Pandas 分析數據</a>(10 小時)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ dashedName: medical-data-visualizer
|
||||
|
||||
我們仍在開發 Python 課程的交互式教學部分。 目前,你可以在 YouTube 上通過 freeCodeCamp.org 上傳的一些視頻學習這個項目相關的知識。
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">給所有人的 Python 課程</a>(14 小時)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">如何使用 Python Pandas 分析數據</a>(10 小時)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ dashedName: page-view-time-series-visualizer
|
||||
|
||||
我們仍在開發 Python 課程的交互式教學部分。 目前,你可以在 freeCodeCamp.org 的 YouTube 頻道中通過視頻學習到這個項目相關的所有知識
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">給所有人的 Python 課程</a>(14 小時)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">如何使用 Python Pandas 分析數據</a>(10 小時)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ dashedName: sea-level-predictor
|
||||
|
||||
我們仍在開發 Python 課程的交互式教學部分。 目前,你可以在 YouTube 上通過 freeCodeCamp.org 上傳的一些視頻學習這個項目相關的知識。
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">給所有人的 Python 課程</a>(14 小時)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">如何使用 Python Pandas 分析數據</a>(10 小時)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ However, in the world of high performance and different element types, sometimes
|
||||
|
||||
<dfn>Typed arrays</dfn> are the answer to this problem. You are now able to say how much memory you want to give an array. Below is a basic overview of the different types of arrays available and the size in bytes for each element in that array.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Type</th><th>Each element size in bytes</th></tr><tr><td><code>Int8Array</code></td><td>1</td></tr><tr><td><code>Uint8Array</code></td><td>1</td></tr><tr><td><code>Uint8ClampedArray</code></td><td>1</td></tr><tr><td><code>Int16Array</code></td><td>2</td></tr><tr><td><code>Uint16Array</code></td><td>2</td></tr><tr><td><code>Int32Array</code></td><td>4</td></tr><tr><td><code>Uint32Array</code></td><td>4</td></tr><tr><td><code>Float32Array</code></td><td>4</td></tr><tr><td><code>Float64Array</code></td><td>8</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Type</th><th>Each element size in bytes</th></tr><tr><td><code>Int8Array</code></td><td>1</td></tr><tr><td><code>Uint8Array</code></td><td>1</td></tr><tr><td><code>Uint8ClampedArray</code></td><td>1</td></tr><tr><td><code>Int16Array</code></td><td>2</td></tr><tr><td><code>Uint16Array</code></td><td>2</td></tr><tr><td><code>Int32Array</code></td><td>4</td></tr><tr><td><code>Uint32Array</code></td><td>4</td></tr><tr><td><code>Float32Array</code></td><td>4</td></tr><tr><td><code>Float64Array</code></td><td>8</td></tr></tbody></table>
|
||||
|
||||
There are two ways in creating these kind of arrays. One way is to create it directly. Below is how to create a 3 length `Int16Array`.
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ play(player, quincy, 1000, verbose=True)
|
||||
|
||||
## 提交
|
||||
|
||||
複製項目的 URL 並在下面提交。
|
||||
Copy your project's URL and submit it to freeCodeCamp.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ dashedName: step-49
|
||||
|
||||
當屏幕寬度較小時,`h1` 不會以應有的方式包含其文本內容。 將 `h1` 元素的文本居中對齊。
|
||||
|
||||
然後,給 `main` 設置 padding,以便可以完全看到 `Student Info` 部分的標題。
|
||||
然後,給 `main` 設置 padding,以便可以完全看到 `Student Info` 的標題。
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ dashedName: build-a-cash-register
|
||||
|
||||
否則,返回 `{status: "OPEN", change: [...]}`,其中 `change` 鍵值是應找回的零錢數,並將找零的面值由高到低排序。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>貨幣單位</th><th>面值</th></tr><tr><td>Penny</td><td>0.01 美元(PENNY)</td></tr><tr><td>Nickel</td><td>0.05 美元(NICKEL)</td></tr><tr><td>Dime</td><td>0.1 美元(DIME)</td></tr><tr><td>Quarter</td><td>0.25 美元(QUARTER)</td></tr><tr><td>Dollar</td><td>1 美元(ONE)</td></tr><tr><td>Five Dollars</td><td>5 美元(FIVE)</td></tr><tr><td>Ten Dollars</td><td>10 美元(TEN)</td></tr><tr><td>Twenty Dollars</td><td>20 美元(TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>100 美元(ONE HUNDRED)</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>貨幣單位</th><th>面值</th></tr><tr><td>Penny</td><td>0.01 美元(PENNY)</td></tr><tr><td>Nickel</td><td>0.05 美元(NICKEL)</td></tr><tr><td>Dime</td><td>0.1 美元(DIME)</td></tr><tr><td>Quarter</td><td>0.25 美元(QUARTER)</td></tr><tr><td>Dollar</td><td>1 美元(ONE)</td></tr><tr><td>Five Dollars</td><td>5 美元(FIVE)</td></tr><tr><td>Ten Dollars</td><td>10 美元(TEN)</td></tr><tr><td>Twenty Dollars</td><td>20 美元(TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>100 美元(ONE HUNDRED)</td></tr></tbody></table>
|
||||
|
||||
下面的抽屜裏現金數組示例:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ dashedName: adjust-the-hue-of-a-color
|
||||
|
||||
下面是一些使用 `hsl()` 描述颜色的例子,颜色都为满饱和度,中等亮度:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>颜色</th><th>HSL</th></tr></thead><tbody><tr><td>红</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>黄</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>绿</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>蓝绿</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>蓝</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>品红</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
<table><thead><tr><th>颜色</th><th>HSL</th></tr></thead><tbody><tr><td>红</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>黄</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>绿</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>蓝绿</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>蓝</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>品红</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ dashedName: learn-about-tertiary-colors
|
||||
|
||||
下面是使用分裂补色搭配法创建的三个颜色:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>颜色</th><th>HEX 颜色码</th></tr></thead><thead></thead><tbody><tr><td>橙色</td><td>#FF7F00</td></tr><tr><td>蓝绿色</td><td>#00FFFF</td></tr><tr><td>树莓红</td><td>#FF007F</td></tr></tbody></table>
|
||||
<table><thead><tr><th>颜色</th><th>HEX 颜色码</th></tr></thead><thead></thead><tbody><tr><td>橙色</td><td>#FF7F00</td></tr><tr><td>蓝绿色</td><td>#00FFFF</td></tr><tr><td>树莓红</td><td>#FF007F</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ CSS 里的 `text-transform` 属性可以改变英文字母的大小写。 使用
|
||||
|
||||
下面的表格展示了 `text-transform` 的不同值对文字 “Transform me” 的影响:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>值</th><th>结果</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"transform me"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORM ME"</td></tr><tr><td><code>capitalize</code></td><td>"Transform Me"</td></tr><tr><td><code>initial</code></td><td>使用默认值</td></tr><tr><td><code>inherit</code></td><td>使用父元素的 <code>text-transform</code> 值。</td></tr><tr><td><code>none</code></td><td><strong>Default:</strong>不改变文字。</td></tr></tbody></table>
|
||||
<table><thead><tr><th>值</th><th>结果</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"transform me"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORM ME"</td></tr><tr><td><code>capitalize</code></td><td>"Transform Me"</td></tr><tr><td><code>initial</code></td><td>使用默认值</td></tr><tr><td><code>inherit</code></td><td>使用父元素的 <code>text-transform</code> 值。</td></tr><tr><td><code>none</code></td><td><strong>Default:</strong>不改变文字。</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ dashedName: use-abbreviated-hex-code
|
||||
|
||||
接下来,使用缩写的十六进制编码给元素设置正确的颜色。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>颜色</th><th>十六进制编码缩写形式</th></tr><tr><td>蓝绿色</td><td><code>#0FF</code></td></tr><tr><td>绿色</td><td><code>#0F0</code></td></tr><tr><td>红色</td><td><code>#F00</code></td></tr><tr><td>紫红色</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>颜色</th><th>十六进制编码缩写形式</th></tr><tr><td>蓝绿色</td><td><code>#0FF</code></td></tr><tr><td>绿色</td><td><code>#0F0</code></td></tr><tr><td>红色</td><td><code>#F00</code></td></tr><tr><td>紫红色</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ dashedName: use-hex-code-to-mix-colors
|
||||
|
||||
把 `style` 标签里面的颜色值用正确的十六进制编码替换。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>颜色</th><th>十六进制编码</th></tr><tr><td>道奇蓝</td><td><code>#1E90FF</code></td></tr><tr><td>绿色</td><td><code>#00FF00</code></td></tr><tr><td>橙色</td><td><code>#FFA500</code></td></tr><tr><td>红色</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>颜色</th><th>十六进制编码</th></tr><tr><td>道奇蓝</td><td><code>#1E90FF</code></td></tr><tr><td>绿色</td><td><code>#00FF00</code></td></tr><tr><td>橙色</td><td><code>#FFA500</code></td></tr><tr><td>红色</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ dashedName: use-rgb-to-mix-colors
|
||||
|
||||
将 `style` 标签里面中的十六进制编码替换为正确的 RGB 值。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>颜色</th><th>RGB</th></tr><tr><td>蓝色</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>红色</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>淡紫色</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>赭黄色</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>颜色</th><th>RGB</th></tr><tr><td>蓝色</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>红色</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>淡紫色</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>赭黄色</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: counting-cards
|
||||
|
||||
牌桌上的大值的卡牌更多,对玩家有利。 根据下面的表格,每张卡牌都被分配了一个值。 如果卡牌的值大于 0,那么玩家应该追加赌注。 如果卡牌的值为 0 或负数,玩家应该追加少许赌注甚至不追加赌注。
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>计数</th><th>卡牌</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
<table><thead><tr><th>计数</th><th>卡牌</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
|
||||
请写一个函数实现 21 点算法。 它根据参数 `card` 的值(见表格,可能是数字或者字符串)来递增或递减全局变量 `count`。 然后函数返回一个由当前 count(计数)和 `Bet`(当 count > 0 时)或 `Hold`(当 count <= 0 时) 拼接的字符串。 注意 count(计数)和玩家的决定(`Bet` 或 `Hold`)之间应该有空格。
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: escape-sequences-in-strings
|
||||
|
||||
引号不是字符串中唯一可以被转义(<dfn>escaped</dfn>)的字符。 转义字符允许你使用可能无法在字符串中使用的字符。
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>代码</th><th>输出</th></tr></thead><tbody><tr><td><code>\'</code></td><td>单引号</td></tr><tr><td><code>\"</code></td><td>双引号</td></tr><tr><td><code>\\</code></td><td>反斜杠</td></tr><tr><td><code>\n</code></td><td>换行符</td></tr><tr><td><code>\t</code></td><td>制表符</td></tr><tr><td><code>\r</code></td><td>回车</td></tr><tr><td><code>\b</code></td><td>退格符</td></tr><tr><td><code>\f</code></td><td>换页符</td></tr></tbody></table>
|
||||
<table><thead><tr><th>代码</th><th>输出</th></tr></thead><tbody><tr><td><code>\'</code></td><td>单引号</td></tr><tr><td><code>\"</code></td><td>双引号</td></tr><tr><td><code>\\</code></td><td>反斜杠</td></tr><tr><td><code>\n</code></td><td>换行符</td></tr><tr><td><code>\t</code></td><td>制表符</td></tr><tr><td><code>\r</code></td><td>回车</td></tr><tr><td><code>\b</code></td><td>退格符</td></tr><tr><td><code>\f</code></td><td>换页符</td></tr></tbody></table>
|
||||
|
||||
*请注意,反斜线本身必须被转义,才能显示为反斜线。*
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: golf-code
|
||||
|
||||
函数将会传送两个参数,`par` 和 `strokes`。 根据下表返回正确的字符串。下表列出不同挥杆次数(从高到低)对应的字符串。
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>挥杆次数</th><th>返回字符串</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
<table><thead><tr><th>挥杆次数</th><th>返回字符串</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
|
||||
`par` 和 `strokes` 必须是数字而且是正数。 题目已定义字符串的数组,便于你操作。
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ dashedName: cash-register
|
||||
|
||||
否则,返回 `{status: "OPEN", change: [...]}`,其中 `change` 键值是应找回的零钱数,并将找零的面值由高到低排序。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>货币单位 Unit</th><th>面值</th></tr><tr><td>Penny</td><td>0.01 美元(PENNY)</td></tr><tr><td>Nickel</td><td>0.05 美元(NICKEL)</td></tr><tr><td>Dime</td><td>0.1 美元(DIME)</td></tr><tr><td>Quarter</td><td>0.25 美元(QUARTER)</td></tr><tr><td>Dollar</td><td>1 美元(ONE)</td></tr><tr><td>Five Dollars</td><td>5 美元(五)</td></tr><tr><td>Ten Dollars</td><td>10 美元(TEN)</td></tr><tr><td>Twenty Dollars</td><td>20 美元(TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>100美元(ONE HUNDRED)</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>货币单位 Unit</th><th>面值</th></tr><tr><td>Penny</td><td>0.01 美元(PENNY)</td></tr><tr><td>Nickel</td><td>0.05 美元(NICKEL)</td></tr><tr><td>Dime</td><td>0.1 美元(DIME)</td></tr><tr><td>Quarter</td><td>0.25 美元(QUARTER)</td></tr><tr><td>Dollar</td><td>1 美元(ONE)</td></tr><tr><td>Five Dollars</td><td>5 美元(五)</td></tr><tr><td>Ten Dollars</td><td>10 美元(TEN)</td></tr><tr><td>Twenty Dollars</td><td>20 美元(TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>100美元(ONE HUNDRED)</td></tr></tbody></table>
|
||||
|
||||
下面的抽屉里现金数组示例:
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
单击按钮元素应在 `true` 和 `false` 之间切换 `visibility` 属性的状态。
|
||||
Clicking the button element should toggle the `visibility` property in state between `true` and `false` and conditionally render the `h1` element.
|
||||
|
||||
```js
|
||||
(() => {
|
||||
@@ -76,11 +76,11 @@ assert.strictEqual(
|
||||
};
|
||||
const second = () => {
|
||||
mockedComponent.find('button').simulate('click');
|
||||
return mockedComponent.state('visibility');
|
||||
return mockedComponent.state('visibility') && mockedComponent.find('h1').exists();
|
||||
};
|
||||
const third = () => {
|
||||
mockedComponent.find('button').simulate('click');
|
||||
return mockedComponent.state('visibility');
|
||||
return mockedComponent.state('visibility') && mockedComponent.find('h1').exists();
|
||||
};
|
||||
const firstValue = first();
|
||||
const secondValue = second();
|
||||
|
||||
@@ -13,31 +13,31 @@ Sass 允许 CSS 规则的嵌套,这在组织样式表的时候会很有用。
|
||||
在 CSS 里,每个元素的样式都需要写在独立的代码块中,如下所示:
|
||||
|
||||
```scss
|
||||
nav {
|
||||
background-color: red;
|
||||
article {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
list-style: none;
|
||||
article p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
display: inline-block;
|
||||
article ul {
|
||||
color: blue;
|
||||
}
|
||||
```
|
||||
|
||||
对于一个大型项目,CSS 规则会很复杂。 这时,引入嵌套功能(即在对应的父元素中写子元素的样式)可以有效地简化代码:
|
||||
|
||||
```scss
|
||||
nav {
|
||||
background-color: red;
|
||||
article {
|
||||
height: 200px;
|
||||
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: issue-tracker
|
||||
构建一个 JavaScript 全栈应用,在功能上与 <a href="https://issue-tracker.freecodecamp.rocks/" target="_blank" rel="noopener noreferrer nofollow">https://issue-tracker.freecodecamp.rocks/</a> 类似。 可以采用下面的任意一种方式完成这个挑战:
|
||||
|
||||
- 克隆<a href="https://github.com/freeCodeCamp/boilerplate-project-issuetracker/" target="_blank" rel="noopener noreferrer nofollow">这个 GitHub 仓库</a>,并在本地完成你的项目。
|
||||
- 使用<a href="https://replit.com/github/freeCodeCamp/boilerplate-project-issuetracker" target="_blank" rel="noopener noreferrer nofollow">我们的 Replit 初始化项目</a>来完成你的项目。
|
||||
- Use <a href="https://replit.com/github/freeCodeCamp/boilerplate-project-issuetracker" target="_blank" rel="noopener noreferrer nofollow">our Replit starter project</a> to complete your project.
|
||||
- 使用一个你喜欢的站点生成器来完成项目。 需要确定包含了我们 GitHub 仓库的所有文件。
|
||||
|
||||
如果你使用 Replit,请按照以下步骤设置项目:
|
||||
|
||||
@@ -84,7 +84,7 @@ arithmetic_arranger(["32 + 8", "1 - 3801", "9999 + 9999", "523 - 49"], True)
|
||||
|
||||
## 提交
|
||||
|
||||
复制项目的 URL 并在下面提交。
|
||||
Copy your project's URL and submit it to freeCodeCamp.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ dashedName: mean-variance-standard-deviation-calculator
|
||||
|
||||
我们仍在开发 Python 课程的交互式教学部分。 目前,你可以在 YouTube 上通过 freeCodeCamp.org 上传的一些视频学习这个项目相关的知识。
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">给所有人的 Python 课程</a>(14 小时)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">如何使用 Python Pandas 分析数据</a>(10 小时)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ dashedName: medical-data-visualizer
|
||||
|
||||
我们仍在开发 Python 课程的交互式教学部分。 目前,你可以在 YouTube 上通过 freeCodeCamp.org 上传的一些视频学习这个项目相关的知识。
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">给所有人的 Python 课程</a>(14 小时)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">如何使用 Python Pandas 分析数据</a>(10 小时)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ dashedName: page-view-time-series-visualizer
|
||||
|
||||
我们仍在开发 Python 课程的交互式教学部分。 目前,你可以在 freeCodeCamp.org 的 YouTube 频道中通过视频学习到这个项目相关的所有知识
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">给所有人的 Python 课程</a>(14 小时)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">如何使用 Python Pandas 分析数据</a>(10 小时)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ dashedName: sea-level-predictor
|
||||
|
||||
我们仍在开发 Python 课程的交互式教学部分。 目前,你可以在 YouTube 上通过 freeCodeCamp.org 上传的一些视频学习这个项目相关的知识。
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">给所有人的 Python 课程</a>(14 小时)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">如何使用 Python Pandas 分析数据</a>(10 小时)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ However, in the world of high performance and different element types, sometimes
|
||||
|
||||
<dfn>Typed arrays</dfn> are the answer to this problem. You are now able to say how much memory you want to give an array. Below is a basic overview of the different types of arrays available and the size in bytes for each element in that array.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Type</th><th>Each element size in bytes</th></tr><tr><td><code>Int8Array</code></td><td>1</td></tr><tr><td><code>Uint8Array</code></td><td>1</td></tr><tr><td><code>Uint8ClampedArray</code></td><td>1</td></tr><tr><td><code>Int16Array</code></td><td>2</td></tr><tr><td><code>Uint16Array</code></td><td>2</td></tr><tr><td><code>Int32Array</code></td><td>4</td></tr><tr><td><code>Uint32Array</code></td><td>4</td></tr><tr><td><code>Float32Array</code></td><td>4</td></tr><tr><td><code>Float64Array</code></td><td>8</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Type</th><th>Each element size in bytes</th></tr><tr><td><code>Int8Array</code></td><td>1</td></tr><tr><td><code>Uint8Array</code></td><td>1</td></tr><tr><td><code>Uint8ClampedArray</code></td><td>1</td></tr><tr><td><code>Int16Array</code></td><td>2</td></tr><tr><td><code>Uint16Array</code></td><td>2</td></tr><tr><td><code>Int32Array</code></td><td>4</td></tr><tr><td><code>Uint32Array</code></td><td>4</td></tr><tr><td><code>Float32Array</code></td><td>4</td></tr><tr><td><code>Float64Array</code></td><td>8</td></tr></tbody></table>
|
||||
|
||||
There are two ways in creating these kind of arrays. One way is to create it directly. Below is how to create a 3 length `Int16Array`.
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ play(player, quincy, 1000, verbose=True)
|
||||
|
||||
## 提交
|
||||
|
||||
复制项目的 URL 并在下面提交。
|
||||
Copy your project's URL and submit it to freeCodeCamp.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ dashedName: step-49
|
||||
|
||||
当屏幕宽度较小时,`h1` 不会以应有的方式包含其文本内容。 将 `h1` 元素的文本居中对齐。
|
||||
|
||||
然后,给 `main` 设置 padding,以便可以完全看到 `Student Info` 部分的标题。
|
||||
然后,给 `main` 设置 padding,以便可以完全看到 `Student Info` 的标题。
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ dashedName: build-a-cash-register
|
||||
|
||||
否则,返回 `{status: "OPEN", change: [...]}`,其中 `change` 键值是应找回的零钱数,并将找零的面值由高到低排序。
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>货币单位</th><th>面值</th></tr><tr><td>Penny</td><td>0.01 美元(PENNY)</td></tr><tr><td>Nickel</td><td>0.05 美元(NICKEL)</td></tr><tr><td>Dime</td><td>0.1 美元(DIME)</td></tr><tr><td>Quarter</td><td>0.25 美元(QUARTER)</td></tr><tr><td>Dollar</td><td>1 美元(ONE)</td></tr><tr><td>Five Dollars</td><td>5 美元(FIVE)</td></tr><tr><td>Ten Dollars</td><td>10 美元(TEN)</td></tr><tr><td>Twenty Dollars</td><td>20 美元(TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>100 美元(ONE HUNDRED)</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>货币单位</th><th>面值</th></tr><tr><td>Penny</td><td>0.01 美元(PENNY)</td></tr><tr><td>Nickel</td><td>0.05 美元(NICKEL)</td></tr><tr><td>Dime</td><td>0.1 美元(DIME)</td></tr><tr><td>Quarter</td><td>0.25 美元(QUARTER)</td></tr><tr><td>Dollar</td><td>1 美元(ONE)</td></tr><tr><td>Five Dollars</td><td>5 美元(FIVE)</td></tr><tr><td>Ten Dollars</td><td>10 美元(TEN)</td></tr><tr><td>Twenty Dollars</td><td>20 美元(TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>100 美元(ONE HUNDRED)</td></tr></tbody></table>
|
||||
|
||||
下面的抽屉里现金数组示例:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Se suele pensar que **Hue** es el "color". Si imaginas un espectro de colores co
|
||||
|
||||
Aquí hay algunos ejemplos de `hsl()` con colores de iluminación normales y completamente saturados:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Color</th><th>HSL</th></tr></thead><tbody><tr><td>rojo</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>amarillo</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>verde</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>cian</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>azul</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>magenta</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Color</th><th>HSL</th></tr></thead><tbody><tr><td>rojo</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>amarillo</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>verde</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>cian</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>azul</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>magenta</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Hay varios métodos para seleccionar colores diferentes que resultan de una comb
|
||||
|
||||
Aquí hay tres colores creados usando el esquema de dividir-complemento:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Color</th><th>Código hexadecimal</th></tr></thead><thead></thead><tbody><tr><td>anaranjado</td><td>#FF7F00</td></tr><tr><td>cian</td><td>#00FFFF</td></tr><tr><td>frambuesa</td><td>#FF007F</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Color</th><th>Código hexadecimal</th></tr></thead><thead></thead><tbody><tr><td>anaranjado</td><td>#FF7F00</td></tr><tr><td>cian</td><td>#00FFFF</td></tr><tr><td>frambuesa</td><td>#FF007F</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ La propiedad `text-transform` en CSS se utiliza para cambiar la apariencia del t
|
||||
|
||||
La siguiente tabla muestra como los diferentes valores de `text-transform` cambian el texto de ejemplo "Transformame".
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Valor</th><th>Resultado</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"Transformame"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORMAME"</td></tr><tr><td><code>capitalize</code></td><td>"Transformame"</td></tr><tr><td><code>initial</code></td><td>Usa el valor predeterminado</td></tr><tr><td><code>inherit</code></td><td>Utiliza el valor <code>text-transform</code> del elemento principal</td></tr><tr><td><code>none</code></td><td><strong>Predeterminado:</strong> Usa el texto original</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Valor</th><th>Resultado</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"Transformame"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORMAME"</td></tr><tr><td><code>capitalize</code></td><td>"Transformame"</td></tr><tr><td><code>initial</code></td><td>Usa el valor predeterminado</td></tr><tr><td><code>inherit</code></td><td>Utiliza el valor <code>text-transform</code> del elemento principal</td></tr><tr><td><code>none</code></td><td><strong>Predeterminado:</strong> Usa el texto original</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Esto reduce el número total de colores posibles a alrededor de 4.000. Sin embar
|
||||
|
||||
¡Pruébalo! Intenta usar los códigos hexadecimales abreviados para asignar colores a los elementos como se indica a continuación.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Color</th><th>Hex code abreviado</th></tr><tr><td>Cyan (cian)</td><td><code>#0FF</code></td></tr><tr><td>Green (verde)</td><td><code>#0F0</code></td></tr><tr><td>Red (rojo)</td><td><code>#F00</code></td></tr><tr><td>Fuchsia (fucsia)</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Color</th><th>Hex code abreviado</th></tr><tr><td>Cyan (cian)</td><td><code>#0FF</code></td></tr><tr><td>Green (verde)</td><td><code>#0F0</code></td></tr><tr><td>Red (rojo)</td><td><code>#F00</code></td></tr><tr><td>Fuchsia (fucsia)</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ El dígito `F` es el número más alto en hex code, y representa el brillo máxi
|
||||
|
||||
Reemplaza las palabras clave de color en nuestro elemento `style` con los códigos hexadecimales correctos.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Color</th><th>Hex Code</th></tr><tr><td>Dodger Blue (azul dodger)</td><td><code>#1E90FF</code></td></tr><tr><td>Green (verde)</td><td><code>#00FF00</code></td></tr><tr><td>Orange (naranja)</td><td><code>#FFA500</code></td></tr><tr><td>Red (rojo)</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Color</th><th>Hex Code</th></tr><tr><td>Dodger Blue (azul dodger)</td><td><code>#1E90FF</code></td></tr><tr><td>Green (verde)</td><td><code>#00FF00</code></td></tr><tr><td>Orange (naranja)</td><td><code>#FFA500</code></td></tr><tr><td>Red (rojo)</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Al igual que con el código hexadecimal, puedes mezclar colores combinando valor
|
||||
|
||||
Reemplaza los hex codes en nuestro elemento `style` con los valores RGB correctos.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Color</th><th>RGB</th></tr><tr><td>Blue (azul)</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>Red (rojo)</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>Orchid (color orquídea)</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>Sienna (siena)</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Color</th><th>RGB</th></tr><tr><td>Blue (azul)</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>Red (rojo)</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>Orchid (color orquídea)</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>Sienna (siena)</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ En el juego de casino Blackjack, un jugador puede determinar si tiene una ventaj
|
||||
|
||||
Tener más cartas altas en la baraja es una ventaja para el jugador. Se le asigna un valor a cada carta de acuerdo a la siguiente tabla. Cuando el conteo es positivo, el jugador debería apostar alto. Cuando el conteo da 0 o negativo, el jugador debería apostar bajo.
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Cambios del conteo</th><th>Cartas</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Cambios del conteo</th><th>Cartas</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
|
||||
Escribirás una función para contar cartas. Recibirá un parámetro `card` (carta) que puede ser un número o una cadena y aumentar o reducir la variable global `count` (conteo) de acuerdo al valor de la carta (observa la tabla). La función devolverá una cadena con el conteo actual y la cadena `Bet` (Apuesta) si el conteo es positivo, o `Hold` (Espera) si el conteo es cero o negativo. El conteo actual y la decisión del jugador (`Bet` o `Hold`) deben estar separados por un solo espacio.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: escape-sequences-in-strings
|
||||
|
||||
Las comillas no son los únicos caracteres que pueden ser <dfn>escapados</dfn> dentro de una cadena. Las secuencias de escape le permiten utilizar caracteres que de otro modo no podrías usar en una cadena.
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Código</th><th>Resultado</th></tr></thead><tbody><tr><td><code>\'</code></td><td>comilla simple</td></tr><tr><td><code>\"</code></td><td>comilla doble</td></tr><tr><td><code>\\</code></td><td>barra invertida</td></tr><tr><td><code>\n</code></td><td>línea nueva</td></tr><tr><td><code>\t</code></td><td>tabulador</td></tr><tr><td><code>\r</code></td><td>retorno del carro</td></tr><tr><td><code>\b</code></td><td>retroceso</td></tr><tr><td><code>\f</code></td><td>fuente de formulario</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Código</th><th>Resultado</th></tr></thead><tbody><tr><td><code>\'</code></td><td>comilla simple</td></tr><tr><td><code>\"</code></td><td>comilla doble</td></tr><tr><td><code>\\</code></td><td>barra invertida</td></tr><tr><td><code>\n</code></td><td>línea nueva</td></tr><tr><td><code>\t</code></td><td>tabulador</td></tr><tr><td><code>\r</code></td><td>retorno del carro</td></tr><tr><td><code>\b</code></td><td>retroceso</td></tr><tr><td><code>\f</code></td><td>fuente de formulario</td></tr></tbody></table>
|
||||
|
||||
*Ten en cuenta que la barra invertida debe escaparse para que aparezca como tal.*
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ En el juego de Golf, cada agujero tiene un `par`, que significa, el número prom
|
||||
|
||||
Tu función recibirá los argumentos `par` y `strokes`. Devuelve la cadena correcta según esta tabla que muestra los golpes en orden de prioridad; superior (más alto) a inferior (más bajo):
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Strokes (golpes)</th><th>Devuelve</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Strokes (golpes)</th><th>Devuelve</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
|
||||
`par` y `strokes` siempre serán numéricos y positivos. Hemos añadido un arreglo de todos los nombres para tu conveniencia.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Devuelve `{status: "CLOSED", change: [...]}` si el efectivo en caja como valor d
|
||||
|
||||
En cualquier otro caso, devuelve `{status: "OPEN", change: [...]}`, con el cambio a entregar en monedas y billetes, ordenados de mayor a menor, como valor de la clave `change`.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Unidad Monetaria</th><th>Importe</th></tr><tr><td>Penny</td><td>$0.01 (PENNY)</td></tr><tr><td>Nickel</td><td>$0.05 (NICKEL)</td></tr><tr><td>Dime</td><td>$0.1 (DIME)</td></tr><tr><td>Quarter</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dollar</td><td>$1 (ONE)</td></tr><tr><td>Five Dollars</td><td>$5 (FIVE)</td></tr><tr><td>Ten Dollars</td><td>$10 (TEN)</td></tr><tr><td>Twenty Dollars</td><td>$20 (TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>$100 (ONE HUNDRED)</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Unidad Monetaria</th><th>Importe</th></tr><tr><td>Penny</td><td>$0.01 (PENNY)</td></tr><tr><td>Nickel</td><td>$0.05 (NICKEL)</td></tr><tr><td>Dime</td><td>$0.1 (DIME)</td></tr><tr><td>Quarter</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dollar</td><td>$1 (ONE)</td></tr><tr><td>Five Dollars</td><td>$5 (FIVE)</td></tr><tr><td>Ten Dollars</td><td>$10 (TEN)</td></tr><tr><td>Twenty Dollars</td><td>$20 (TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td>$100 (ONE HUNDRED)</td></tr></tbody></table>
|
||||
|
||||
A continuación, un ejemplo del efectivo en caja en formato de arreglo:
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
Al hacer clic en el botón se debe cambiar la propiedad `visibility` en el estado entre `true` y `false`.
|
||||
Clicking the button element should toggle the `visibility` property in state between `true` and `false` and conditionally render the `h1` element.
|
||||
|
||||
```js
|
||||
(() => {
|
||||
@@ -76,11 +76,11 @@ Al hacer clic en el botón se debe cambiar la propiedad `visibility` en el estad
|
||||
};
|
||||
const second = () => {
|
||||
mockedComponent.find('button').simulate('click');
|
||||
return mockedComponent.state('visibility');
|
||||
return mockedComponent.state('visibility') && mockedComponent.find('h1').exists();
|
||||
};
|
||||
const third = () => {
|
||||
mockedComponent.find('button').simulate('click');
|
||||
return mockedComponent.state('visibility');
|
||||
return mockedComponent.state('visibility') && mockedComponent.find('h1').exists();
|
||||
};
|
||||
const firstValue = first();
|
||||
const secondValue = second();
|
||||
|
||||
@@ -13,31 +13,31 @@ Sass permite anidar las reglas CSS, que es una forma útil de organizar una hoja
|
||||
Normalmente, cada elemento está dirigido a una línea diferente para darle estilo, así:
|
||||
|
||||
```scss
|
||||
nav {
|
||||
background-color: red;
|
||||
article {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
list-style: none;
|
||||
article p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
display: inline-block;
|
||||
article ul {
|
||||
color: blue;
|
||||
}
|
||||
```
|
||||
|
||||
Para un proyecto grande, el archivo CSS tendrá muchas líneas y reglas. Aquí es donde la anidación puede ayudar a organizar tu código colocando reglas de estilo hijo dentro de los respectivos elementos padres:
|
||||
|
||||
```scss
|
||||
nav {
|
||||
background-color: red;
|
||||
article {
|
||||
height: 200px;
|
||||
|
||||
p {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
}
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: issue-tracker
|
||||
Crea una aplicación full stack de JavaScript que sea funcionalmente similar a esta: <a href="https://issue-tracker.freecodecamp.rocks/" target="_blank" rel="noopener noreferrer nofollow">https://issue-tracker.freecodecamp.rocks/</a>. Trabajar en este proyecto implicará escribir tu código utilizando uno de los siguientes métodos:
|
||||
|
||||
- Clone este repositorio de <a href="https://github.com/freeCodeCamp/boilerplate-project-issuetracker/" target="_blank" rel="noopener noreferrer nofollow"> GitHub</a> y complete estos desafíos localmente.
|
||||
- Usa <a href="https://replit.com/github/freeCodeCamp/boilerplate-project-issuetracker" target="_blank" rel="noopener noreferrer nofollow">nuestro proyecto inicial de Replit</a> para completar tu proyecto.
|
||||
- Use <a href="https://replit.com/github/freeCodeCamp/boilerplate-project-issuetracker" target="_blank" rel="noopener noreferrer nofollow">our Replit starter project</a> to complete your project.
|
||||
- Usa un constructor de sitios de tu elección para completar el proyecto. Asegúrate de incorporar todos los archivos de nuestro repositorio de GitHub.
|
||||
|
||||
Si usas Replit, sigue estos pasos para configurar el proyecto:
|
||||
|
||||
@@ -84,7 +84,7 @@ Las pruebas unitarias para este proyecto están en `test_module.py`. Ejecutamos
|
||||
|
||||
## Envío
|
||||
|
||||
Copia el enlace de tu proyecto y envíalo a freeCodeCamp.
|
||||
Copy your project's URL and submit it to freeCodeCamp.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Estarás <a href="https://replit.com/github/freeCodeCamp/boilerplate-mean-varian
|
||||
|
||||
Todavía estamos desarrollando la parte interactiva del currículo de Python. Por ahora, aquí hay algunos videos en el canal de YouTube de freeCodeCamp.org que te enseñaran todo lo que necesitas saber para completar este proyecto:
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a>(14 hours)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">How to Analyze Data with Python Pandas</a> (10 hours)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Estarás <a href="https://replit.com/github/freeCodeCamp/boilerplate-medical-dat
|
||||
|
||||
Todavía estamos desarrollando la parte interactiva del currículo de Python. Por ahora, aquí hay algunos vídeos en nuestro canal de YouTube freeCodeCamp.org que te enseñará todo lo que necesitas saber para completer este proyecto:
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a>(14 hours)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">How to Analyze Data with Python Pandas</a> (10 hours)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Estarás <a href="https://replit.com/github/freeCodeCamp/boilerplate-page-view-t
|
||||
|
||||
Todavía estamos desarrollando la parte interactiva del currículo de Python. Por el momento, aquí hay algunos videos en el canal de YouTube de freeCodeCamp.org que te enseñaran todo lo que necesitas saber para completar este proyecto:
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a>(14 horas)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">How to Analyze Data with Python Pandas</a> (10 horas)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Estarás <a href="https://replit.com/github/freeCodeCamp/boilerplate-sea-level-p
|
||||
|
||||
Todavía estamos desarrollando la parte interactiva del currículo de Python. Por ahora, aquí hay algunos videos en el canal de YouTube de freeCodeCamp.org que te enseñaran todo lo que necesitas saber para completar este proyecto:
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a>(14 hours)
|
||||
- <a href="https://www.freecodecamp.org/news/python-for-everybody/" target="_blank" rel="noopener noreferrer nofollow">Python for Everybody Video Course</a> (14 hours)
|
||||
|
||||
- <a href="https://www.freecodecamp.org/news/how-to-analyze-data-with-python-pandas/" target="_blank" rel="noopener noreferrer nofollow">How to Analyze Data with Python Pandas</a> (10 hours)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Sin embargo, en el mundo de alto rendimiento y diferentes tipos de elementos, a
|
||||
|
||||
<dfn>Los arreglos escritos</dfn> son la respuesta a este problema. Ahora puedes decir cuánta memoria quieres dar a una matriz. Debajo hay una visión general básica de los diferentes tipos de matrices disponibles y el tamaño en bytes para cada elemento de esa matriz.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Tipo</th><th>Cada tamaño de elemento en bytes</th></tr><tr><td><code>Int8Array</code></td><td>1</td></tr><tr><td><code>Uint8Array</code></td><td>1</td></tr><tr><td><code>Uint8ClampedArray</code></td><td>1</td></tr><tr><td><code>Int16Array</code></td><td>2</td></tr><tr><td><code>Uint16Array</code></td><td>2</td></tr><tr><td><code>Int32Array</code></td><td>4</td></tr><tr><td><code>Uint32Array</code></td><td>4</td></tr><tr><td><code>Float32Array</code></td><td>4</td></tr><tr><td><code>Float64Array</code></td><td>8</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Tipo</th><th>Cada tamaño de elemento en bytes</th></tr><tr><td><code>Int8Array</code></td><td>1</td></tr><tr><td><code>Uint8Array</code></td><td>1</td></tr><tr><td><code>Uint8ClampedArray</code></td><td>1</td></tr><tr><td><code>Int16Array</code></td><td>2</td></tr><tr><td><code>Uint16Array</code></td><td>2</td></tr><tr><td><code>Int32Array</code></td><td>4</td></tr><tr><td><code>Uint32Array</code></td><td>4</td></tr><tr><td><code>Float32Array</code></td><td>4</td></tr><tr><td><code>Float64Array</code></td><td>8</td></tr></tbody></table>
|
||||
|
||||
Hay dos formas de crear este tipo de matriz. Una forma es crearla directamente. A continuación se muestra cómo crear una longitud de 3 `Int16Array`.
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ The unit tests for this project are in `test_module.py`. We imported the tests f
|
||||
|
||||
## Submitting
|
||||
|
||||
Copy your project's URL and submit it below.
|
||||
Copy your project's URL and submit it to freeCodeCamp.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Devuelve `{status: "CLOSED", change: [...]}` si el efectivo en caja como valor d
|
||||
|
||||
En cualquier otro caso, devuelve `{status: "OPEN", change: [...]}`, con el cambio a entregar en monedas y billetes, ordenados de mayor a menor, como valor de la clave `change`.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Unidad Monetaria</th><th>Importe</th></tr><tr><td>Centavo</td><td>$0.01 (CENTAVO)</td></tr><tr><td>Níquel</td><td>$0.05 (NÍQUEL)</td></tr><tr><td>Díez Centavos</td><td>$0.1 (DÍEZ CENTAVOS)</td></tr><tr><td>25 centavos</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dólar</td><td>$1 (UNO)</td></tr><tr><td>Cinco dólares</td><td>$5 (CINCO)</td></tr><tr><td>Diez dólares</td><td>$10 (DÍEZ)</td></tr><tr><td>Veinte dólares</td><td>$20 (VEINTE)</td></tr><tr><td>Cien dólares</td><td>$100 (CIEN)</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Unidad Monetaria</th><th>Importe</th></tr><tr><td>Centavo</td><td>$0.01 (CENTAVO)</td></tr><tr><td>Níquel</td><td>$0.05 (NÍQUEL)</td></tr><tr><td>Díez Centavos</td><td>$0.1 (DÍEZ CENTAVOS)</td></tr><tr><td>25 centavos</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dólar</td><td>$1 (UNO)</td></tr><tr><td>Cinco dólares</td><td>$5 (CINCO)</td></tr><tr><td>Diez dólares</td><td>$10 (DÍEZ)</td></tr><tr><td>Veinte dólares</td><td>$20 (VEINTE)</td></tr><tr><td>Cien dólares</td><td>$100 (CIEN)</td></tr></tbody></table>
|
||||
|
||||
Vea a continuación un ejemplo de un arreglo de efectivo en caja:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Farben haben verschiedene Eigenschaften wie Farbton, Sättigung und Helligkeit.
|
||||
|
||||
Hier sind einige Beispiele für die Verwendung von `hsl()` mit vollständig gesättigten Farben bei mittlerer Helligkeit:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Farbe</th><th>HSL</th></tr></thead><tbody><tr><td>rot</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>gelb</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>grün</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>cyan</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>blau</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>magenta</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Farbe</th><th>HSL</th></tr></thead><tbody><tr><td>rot</td><td>hsl(0, 100%, 50%)</td></tr><tr><td>gelb</td><td>hsl(60, 100%, 50%)</td></tr><tr><td>grün</td><td>hsl(120, 100%, 50%)</td></tr><tr><td>cyan</td><td>hsl(180, 100%, 50%)</td></tr><tr><td>blau</td><td>hsl(240, 100%, 50%)</td></tr><tr><td>magenta</td><td>hsl(300, 100%, 50%)</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Es gibt verschiedene Methoden zur Auswahl von Farbkombinationen, die zu stimmige
|
||||
|
||||
Hier sind drei Farben, die mit dem Split-Komplementär-Schema erstellt wurden:
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Farbe</th><th>Hex-Code</th></tr></thead><thead></thead><tbody><tr><td>orange</td><td>#FF7F00</td></tr><tr><td>cyan</td><td>#00FFFF</td></tr><tr><td>himbeerfarben</td><td>#FF007F</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Farbe</th><th>Hex-Code</th></tr></thead><thead></thead><tbody><tr><td>orange</td><td>#FF7F00</td></tr><tr><td>cyan</td><td>#00FFFF</td></tr><tr><td>himbeerfarben</td><td>#FF007F</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Die `text-transform`-Eigenschaft in CSS wird verwendet, um das Aussehen von Text
|
||||
|
||||
Die folgende Tabelle zeigt, wie die verschiedenen `text-transform`-Werte den Beispieltext "Transform me" verändern.
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Wert</th><th>Ergebnis</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"transform me"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORM ME"</td></tr><tr><td><code>capitalize</code></td><td>"Transform Me"</td></tr><tr><td><code>initial</code></td><td>Verwende den Standardwert</td></tr><tr><td><code>inherit</code></td><td>Verwendet den <code>text-transform</code>-Wert aus dem übergeordneten Element</td></tr><tr><td><code>none</code></td><td><strong>Standard:</strong> Verwendet den ursprünglichen Text</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Wert</th><th>Ergebnis</th></tr></thead><tbody><tr><td><code>lowercase</code></td><td>"transform me"</td></tr><tr><td><code>uppercase</code></td><td>"TRANSFORM ME"</td></tr><tr><td><code>capitalize</code></td><td>"Transform Me"</td></tr><tr><td><code>initial</code></td><td>Verwende den Standardwert</td></tr><tr><td><code>inherit</code></td><td>Verwendet den <code>text-transform</code>-Wert aus dem übergeordneten Element</td></tr><tr><td><code>none</code></td><td><strong>Standard:</strong> Verwendet den ursprünglichen Text</td></tr></tbody></table>
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Dadurch reduziert sich die Gesamtzahl der möglichen Farben auf etwa 4.000. Die
|
||||
|
||||
Versuche, mithilfe der gekürzten Hex-Codes die richtigen Elemente einzufärben.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Farbe</th><th>gekürzter Hex-Code</th></tr><tr><td>Cyan</td><td><code>#0FF</code></td></tr><tr><td>Grün</td><td><code>#0F0</code></td></tr><tr><td>Rot</td><td><code>#F00</code></td></tr><tr><td>Fuchsia</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Farbe</th><th>gekürzter Hex-Code</th></tr><tr><td>Cyan</td><td><code>#0FF</code></td></tr><tr><td>Grün</td><td><code>#0F0</code></td></tr><tr><td>Rot</td><td><code>#F00</code></td></tr><tr><td>Fuchsia</td><td><code>#F0F</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ Die Ziffer `F` ist die höchste Zahl im Hex-Code und repräsentiert die maximal
|
||||
|
||||
Ersetze die Farbwörter in unserem `style` Element mit ihnen entsprechenden Hex-Codes. (Anm.: "Dodger Blue" bezieht sich auf die blaue Uniform der Baseball-Mannschaft Los Angeles Dodgers)
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Farbe</th><th>Hex-Code</th></tr><tr><td>"Dodger Blue"</td><td><code>#1E90FF</code></td></tr><tr><td>Grün</td><td><code>#00FF00</code></td></tr><tr><td>Orange</td><td><code>#FFA500</code></td></tr><tr><td>Rot</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Farbe</th><th>Hex-Code</th></tr><tr><td>"Dodger Blue"</td><td><code>#1E90FF</code></td></tr><tr><td>Grün</td><td><code>#00FF00</code></td></tr><tr><td>Orange</td><td><code>#FFA500</code></td></tr><tr><td>Rot</td><td><code>#FF0000</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Genau wie bei Hex-Code, kannst du Farben in RGB durch Kombinationen unterschiedl
|
||||
|
||||
Ersetze die Hex-Codes in unserem `style`-Element mit entsprechenden RGB-Werten.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Farbe</th><th>RGB</th></tr><tr><td>Blau</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>Rot</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>Orchideen-Lila</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>Siena-Braun</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Farbe</th><th>RGB</th></tr><tr><td>Blau</td><td><code>rgb(0, 0, 255)</code></td></tr><tr><td>Rot</td><td><code>rgb(255, 0, 0)</code></td></tr><tr><td>Orchideen-Lila</td><td><code>rgb(218, 112, 214)</code></td></tr><tr><td>Siena-Braun</td><td><code>rgb(160, 82, 45)</code></td></tr></tbody></table>
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ We defined the variable `food` in the loop head and this variable was set to eac
|
||||
|
||||
# --instructions--
|
||||
|
||||
Wir haben eine Funktion `countOnline` definiert, die ein Argument (ein Nutzer-Objekt) `allUsers` akzeptiert. Use a <dfn>for...in</dfn> statement inside this function to loop through the `allUsers` object and return the number of users whose `online` property is set to `true`. Ein Beispiel für ein Objekt, das an `countOnline` übergeben werden könnte, ist unten abgebildet. Jeder Nutzer wird eine `online`-Eigenschaft mit entweder einem `true` oder `false`-Wert besitzen.
|
||||
Wir haben eine Funktion `countOnline` definiert, die ein Argument (ein Nutzer-Objekt) `allUsers` akzeptiert. Verwende eine <dfn>for...in</dfn>-Anweisung innerhalb dieser Funktion, um das `allUsers`-Objekt zu durchlaufen und die Anzahl der Benutzer zurückzugeben, deren `online`-Eigenschaft auf `true` gesetzt ist. Ein Beispiel für ein Objekt, das an `countOnline` übergeben werden könnte, ist unten abgebildet. Jeder Nutzer wird eine `online`-Eigenschaft mit entweder einem `true` oder `false`-Wert besitzen.
|
||||
|
||||
```js
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ Beim Kasinospiel Blackjack kann ein Spieler, indem er die relative Anzahl der im
|
||||
|
||||
Wenn mehr hohe Karten im Deck verbleiben, ist der Spieler im Vorteil. Jeder Karte wird ein Wert gemäß der folgenden Tabelle zugewiesen. Wenn die Zählung positiv ist, sollte der Spieler hoch setzen. Wenn die Anzahl null oder negativ ist, sollte der Spieler niedrig setzen.
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Veränderung der Zählung</th><th>Karten</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Veränderung der Zählung</th><th>Karten</th></tr></thead><tbody><tr><td>+1</td><td>2, 3, 4, 5, 6</td></tr><tr><td>0</td><td>7, 8, 9</td></tr><tr><td>-1</td><td>10, 'J', 'Q', 'K', 'A'</td></tr></tbody></table>
|
||||
|
||||
Du wirst eine Funktion zum Zählen von Karten schreiben. Sie erhält einen `card`-Parameter, der eine Zahl oder ein String sein kann, und erhöht oder verringert die globale `count`-Variable entsprechend dem Wert der Karte (siehe Tabelle). Die Funktion gibt dann einen String mit dem aktuellen Zählerstand und dem String `Bet` zurück, wenn der Zählerstand positiv ist, oder `Hold`, wenn der Zählerstand null oder negativ ist. Die aktuelle Anzahl und die Entscheidung des Spielers (`Bet` oder `Hold`) sollten durch ein einzelnes Leerzeichen getrennt werden.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: escape-sequences-in-strings
|
||||
|
||||
Anführungszeichen sind nicht die einzigen Zeichen, die innerhalb eines Strings <dfn>ausgelassen</dfn> werden können. Escape-Sequenzen ermöglichen es dir, Zeichen zu verwenden, die du sonst nicht in einem String verwenden könntest.
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Code</th><th>Ausgabe</th></tr></thead><tbody><tr><td><code>\'</code></td><td>Einzelnes Anführungszeichen</td></tr><tr><td><code>\"</code></td><td>Doppeltes Anführungszeichen</td></tr><tr><td><code>\\</code></td><td>Backslash</td></tr><tr><td><code>\n</code></td><td>Zeilenumbruch</td></tr><tr><td><code>\t</code></td><td>Tabulator</td></tr><tr><td><code>\r</code></td><td>Wagenrücklauf (Carriage Return)</td></tr><tr><td><code>\b</code></td><td>Backspace</td></tr><tr><td><code>\f</code></td><td>Seitenvorschub (Formfeed)</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Code</th><th>Ausgabe</th></tr></thead><tbody><tr><td><code>\'</code></td><td>Einzelnes Anführungszeichen</td></tr><tr><td><code>\"</code></td><td>Doppeltes Anführungszeichen</td></tr><tr><td><code>\\</code></td><td>Backslash</td></tr><tr><td><code>\n</code></td><td>Zeilenumbruch</td></tr><tr><td><code>\t</code></td><td>Tabulator</td></tr><tr><td><code>\r</code></td><td>Wagenrücklauf (Carriage Return)</td></tr><tr><td><code>\b</code></td><td>Backspace</td></tr><tr><td><code>\f</code></td><td>Seitenvorschub (Formfeed)</td></tr></tbody></table>
|
||||
|
||||
*Bitte beachte, dass das Backslash selbst mit einem Escape-Zeichen versehen werden muss, um als Backslash angezeigt zu werden.*
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Beim Golf hat jedes Loch einen `par`, also die durchschnittliche Anzahl von `str
|
||||
|
||||
Deiner Funktion werden die Argumente `par` und `strokes` übergeben. Gib den richtigen String gemäß dieser Tabelle zurück, die die Schläge in der Reihenfolge ihrer Priorität auflistet: von oben (am höchsten) nach unten (am niedrigsten):
|
||||
|
||||
<table class='table table-striped'><thead><tr><th>Schläge</th><th>Ausgabe</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
<table><thead><tr><th>Schläge</th><th>Ausgabe</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td><= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>>= par + 3</td><td>"Go Home!"</td></tr></tbody></table>
|
||||
|
||||
`par` und `strokes` werden immer numerisch und positiv sein. Wir haben eine Liste mit allen Namen für dich zusammengestellt.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ dashedName: selecting-from-many-options-with-switch-statements
|
||||
|
||||
# --description--
|
||||
|
||||
If you need to match one value against many options, you can use a <dfn>switch</dfn> statement. Eine `switch`-Anweisung vergleich den Wert einen mit der <dfn>case</dfn>-Anweisungen, in denen verschiedene mögliche Werte definiert werden. Any valid JavaScript statements can be executed inside a <dfn>case</dfn> block and will run from the first matched `case` value until a `break` is encountered.
|
||||
Wenn du einen Wert mit vielen Optionen abgleichen musst, kannst du eine <dfn>switch</dfn>-Anweisung verwenden. Eine `switch`-Anweisung vergleich den Wert einen mit der <dfn>case</dfn>-Anweisungen, in denen verschiedene mögliche Werte definiert werden. Alle gültigen JavaScript-Anweisungen können innerhalb eines <dfn>case</dfn>-Blocks ausgeführt werden und werden ab dem ersten übereinstimmenden `case`-Wert ausgeführt, bis ein `break` auftritt.
|
||||
|
||||
Hier ist ein Beispiel für eine `switch`-Anweisung:
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ dashedName: testing-objects-for-properties
|
||||
|
||||
# --description--
|
||||
|
||||
To check if a property on a given object exists or not, you can use the `.hasOwnProperty()` method. `someObject.hasOwnProperty(someProperty)` gibt `true` oder `false` zurück, je nachdem, ob die Eigenschaft auf dem Objekt gefunden wird oder nicht.
|
||||
Um zu prüfen, ob eine Eigenschaft eines bestimmten Objekts existiert oder nicht, kannst du die Methode `.hasOwnProperty()` verwenden. `someObject.hasOwnProperty(someProperty)` gibt `true` oder `false` zurück, je nachdem, ob die Eigenschaft auf dem Objekt gefunden wird oder nicht.
|
||||
|
||||
**Beispiel**
|
||||
|
||||
@@ -25,7 +25,7 @@ Der erste `checkForProperty`-Funktionsaufruf gibt `true` zurück, während der z
|
||||
|
||||
# --instructions--
|
||||
|
||||
Modify the function `checkObj` to test if the object passed to the function parameter `obj` contains the specific property passed to the function parameter `checkProp`. If the property passed to `checkProp` is found on `obj`, return that property's value. Wenn nicht, wird `Not Found` zurückgegeben.
|
||||
Ändere die Funktion `checkObj` so, dass sie prüft, ob das Objekt, das an den Funktionsparameter `obj` übergeben wurde, die spezifische Eigenschaft enthält, die an den Funktionsparameter `checkProp` übergeben wurde. Wenn die an `checkProp` übergebene Eigenschaft auf `obj` gefunden wird, wird der Wert dieser Eigenschaft zurückgegeben. Wenn nicht, wird `Not Found` zurückgegeben.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`wordBlanks` should contain all of the words assigned to the variables `myNoun`, `myVerb`, `myAdjective` and `myAdverb` separated by non-word characters (and any additional words of your choice).
|
||||
`wordBlanks` sollte alle Wörter enthalten, die den Variablen `myNoun`, `myVerb`, `myAdjective` und `myAdverb` zugeordnet sind, getrennt durch Nicht-Wort-Zeichen (und zusätzliche Wörter deiner Wahl).
|
||||
|
||||
```js
|
||||
assert(
|
||||
|
||||
@@ -20,7 +20,7 @@ Gib `{status: "CLOSED", change: [...]}` als Wert für den Key `change` zurück,
|
||||
|
||||
Andernfalls wird `{status: "OPEN", change: [...]}`, mit dem fälligen Wechselgeld in Münzen und Scheinen, sortiert in der höchsten bis niedrigsten Reihenfolge, als Wert des Keys `change` zurückgegeben.
|
||||
|
||||
<table class='table table-striped'><tbody><tr><th>Währungseinheit</th><th>Anzahl</th></tr><tr><td>Penny</td><td>$0.01 (PENNY)</td></tr><tr><td>Nickel</td><td>$0.05 (NICKEL)</td></tr><tr><td>Dime</td><td>$0.1 (DIME)</td></tr><tr><td>Quarter</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dollar</td><td>$1 (ONE)</td></tr><tr><td>Fünf Dollar</td><td>$5 (FIVE)</td></tr><tr><td>Zehn Dollar</td><td>$10 (TEN)</td></tr><tr><td>Zwanzig Dollar</td><td>$20 (TWENTY)</td></tr><tr><td>Einhundert Dollar</td><td>$100 (ONE HUNDRED)</td></tr></tbody></table>
|
||||
<table><tbody><tr><th>Währungseinheit</th><th>Anzahl</th></tr><tr><td>Penny</td><td>$0.01 (PENNY)</td></tr><tr><td>Nickel</td><td>$0.05 (NICKEL)</td></tr><tr><td>Dime</td><td>$0.1 (DIME)</td></tr><tr><td>Quarter</td><td>$0.25 (QUARTER)</td></tr><tr><td>Dollar</td><td>$1 (ONE)</td></tr><tr><td>Fünf Dollar</td><td>$5 (FIVE)</td></tr><tr><td>Zehn Dollar</td><td>$10 (TEN)</td></tr><tr><td>Zwanzig Dollar</td><td>$20 (TWENTY)</td></tr><tr><td>Einhundert Dollar</td><td>$100 (ONE HUNDRED)</td></tr></tbody></table>
|
||||
|
||||
Unten findest du ein Beispiel für Wechselgeld:
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user