Files
freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/rosetta-code/fibonacci-sequence.chinese.md
Kristofer Koishigawa b3213fc892 fix(i18n): chinese test suite (#38220)
* fix: Chinese test suite

Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working.

* fix: ran script, updated testStrings and solutions
2020-03-03 18:49:47 +05:30

61 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Fibonacci sequence
id: 597f24c1dda4e70f53c79c81
challengeType: 5
videoUrl: ''
localeTitle: 斐波那契序列
---
## Description
<section id="description"><p>编写一个函数来生成第<big>n <sup></sup></big> Fibonacci数。 </p> /// <p><big>n <sup></sup></big> Fibonacci数由下式给出/// </p><p> F <sub>n</sub> = F <sub>n-1</sub> + F <sub>n-2</sub> </p> /// <p>该系列的前两个术语是0,1。 </p> /// <p>因此该系列是0,1,1,2,3,5,8,13 ...... </p> /// </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>fibonacci</code>是一种功能。
testString: assert(typeof fibonacci === 'function');
- text: <code>fibonacci(2)</code>应该返回一个数字。
testString: assert(typeof fibonacci(2) == 'number');
- text: <code>fibonacci(3)</code>应该返回1.“)
testString: assert.equal(fibonacci(3),1);
- text: <code>fibonacci(5)</code>应该返回3.“)
testString: assert.equal(fibonacci(5),3);
- text: <code>fibonacci(10)</code>应该返回34.“)
testString: assert.equal(fibonacci(10),34);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function fibonacci(n) {
// Good luck!
}
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>