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

1.3 KiB
Raw Blame History

id, title, isRequired, challengeType, videoUrl, localeTitle
id title isRequired challengeType videoUrl localeTitle
a3bfc1673c0526e06d3ac698 Sum All Primes true 5 Sum All Primes

Description

将所有素数加起来并包括所提供的数字。素数被定义为大于1的数并且只有两个除数一个和一个除数。例如2是素数因为它只能被1和2整除。提供的号码可能不是主要的。如果卡住请记得使用Read-Search-Ask 。尝试配对程序。编写自己的代码。

Instructions

Tests

tests:
  - text: <code>sumPrimes(10)</code>应该返回一个数字。
    testString: assert.deepEqual(typeof sumPrimes(10), 'number');
  - text: <code>sumPrimes(10)</code>应该返回17。
    testString: assert.deepEqual(sumPrimes(10), 17);
  - text: <code>sumPrimes(977)</code>应该返回73156。
    testString: assert.deepEqual(sumPrimes(977), 73156);

Challenge Seed

function sumPrimes(num) {
  return num;
}

sumPrimes(10);

Solution

// solution required