Fix: remove quote from challenge where not needed [english] (#35493)

This commit is contained in:
NITIN BISHT
2019-03-19 15:04:03 +05:30
committed by The Coding Aviator
parent 4d1d89b1c7
commit 228d873dd3
14 changed files with 35 additions and 35 deletions

View File

@ -9,7 +9,7 @@ challengeType: 5
Task:
<p>Implement a function which:</p>
takes a positive integer representing a duration in seconds as input (e.g., <code>100</code>), and
returns a string which shows the same duration decomposed into weeks, days, hours, minutes, and seconds as detailed below (e.g., "<code>1 min, 40 sec</code>").
returns a string which shows the same duration decomposed into weeks, days, hours, minutes, and seconds as detailed below (e.g., <code>1 min, 40 sec</code>).
<p>Demonstrate that it passes the following three test-cases:</p><p style="font-size:115%; margin:1em 0 0 0">Test Cases</p>
<table>
<tbody>
@ -67,7 +67,7 @@ The following five units should be used:
</tr>
</tbody>
</table>
However, only include quantities with non-zero values in the output (e.g., return "<code>1 d</code>" and not "<code>0 wk, 1 d, 0 hr, 0 min, 0 sec</code>").Give larger units precedence over smaller ones as much as possible (e.g., return <code>2 min, 10 sec</code> and not <code>1 min, 70 sec</code> or <code>130 sec</code>)Mimic the formatting shown in the test-cases (quantities sorted from largest unit to smallest and separated by comma+space; value and unit of each quantity separated by space).
However, only include quantities with non-zero values in the output (e.g., return <code>1 d</code> and not <code>0 wk, 1 d, 0 hr, 0 min, 0 sec</code>).Give larger units precedence over smaller ones as much as possible (e.g., return <code>2 min, 10 sec</code> and not <code>1 min, 70 sec</code> or <code>130 sec</code>)Mimic the formatting shown in the test-cases (quantities sorted from largest unit to smallest and separated by comma+space; value and unit of each quantity separated by space).
<p><hr style="margin:1em 0;"/></p>
</section>

View File

@ -33,11 +33,11 @@ tests:
testString: assert(typeof factorial === 'function', '<code>factorial</code> is a function.');
- text: <code>factorial(2)</code> should return a number.
testString: assert(typeof factorial(2) === 'number', '<code>factorial(2)</code> should return a number.');
- text: <code>factorial(3)</code> should return 6.")
- text: <code>factorial(3)</code> should return 6.
testString: assert.equal(factorial(3),results[0],"<code>factorial(3)</code> should return 6.");
- text: <code>factorial(3)</code> should return 120.")
- text: <code>factorial(3)</code> should return 120.
testString: assert.equal(factorial(5),results[1],"<code>factorial(3)</code> should return 120.");
- text: <code>factorial(3)</code> should return 3,628,800.")
- text: <code>factorial(3)</code> should return 3,628,800.
testString: assert.equal(factorial(10),results[2],"<code>factorial(3)</code> should return 3,628,800.");
```

View File

@ -28,11 +28,11 @@ tests:
testString: assert(typeof fibonacci === 'function', '<code>fibonacci</code> is a function.');
- text: <code>fibonacci(2)</code> should return a number.
testString: assert(typeof fibonacci(2) == 'number', '<code>fibonacci(2)</code> should return a number.');
- text: <code>fibonacci(3)</code> should return 1.")
- text: <code>fibonacci(3)</code> should return 1.
testString: assert.equal(fibonacci(3),1,"<code>fibonacci(3)</code> should return 1.");
- text: <code>fibonacci(5)</code> should return 3.")
- text: <code>fibonacci(5)</code> should return 3.
testString: assert.equal(fibonacci(5),3,"<code>fibonacci(5)</code> should return 3.");
- text: <code>fibonacci(10)</code> should return 34.")
- text: <code>fibonacci(10)</code> should return 34.
testString: assert.equal(fibonacci(10),34,"<code>fibonacci(10)</code> should return 34.");
```

View File

@ -59,9 +59,9 @@ for examples of native data structures.)
tests:
- text: <code>parseSexpr</code> is a function.
testString: assert(typeof parseSexpr === 'function', '<code>parseSexpr</code> is a function.');
- text: <code>parseSexpr('(data1 data2 data3)')</code> should return ['data1', 'data2', 'data3']")
- text: <code>parseSexpr('(data1 data2 data3)')</code> should return <code>['data1', 'data2', 'data3']</code>
testString: assert.deepEqual(parseSexpr(simpleSExpr), simpleSolution, "<code>parseSexpr('(data1 data2 data3)')</code> should return ['data1', 'data2', 'data3']");
- text: <code>parseSexpr('(data1 data2 data3)')</code> should return an array with 3 elements")
- text: <code>parseSexpr('(data1 data2 data3)')</code> should return an array with 3 elements.
testString: assert.deepEqual(parseSexpr(basicSExpr), basicSolution, "<code>parseSexpr('(data1 data2 data3)')</code> should return an array with 3 elements");
```

View File

@ -52,13 +52,13 @@ challengeType: 5
tests:
- text: <code>sedol</code> is a function.
testString: assert(typeof sedol === 'function', '<code>sedol</code> is a function.');
- text: <code>sedol('a')</code> should return null.")
- text: <code>sedol('a')</code> should return null.
testString: assert(sedol('a') === null, "<code>sedol('a')</code> should return null.");
- text: <code>sedol('710889')</code> should return '7108899'.")
- text: <code>sedol('710889')</code> should return '7108899'.
testString: assert(sedol('710889') === '7108899', "<code>sedol('710889')</code> should return '7108899'.");
- text: <code>sedol('BOATER')</code> should return null.")
- text: <code>sedol('BOATER')</code> should return null.
testString: assert(sedol('BOATER') === null, "<code>sedol('BOATER')</code> should return null.");
- text: <code>sedol('228276')</code> should return '2282765'.")
- text: <code>sedol('228276')</code> should return '2282765'.
testString: assert(sedol('228276') === '2282765', "<code>sedol('228276')</code> should return '2282765'.");
```

View File

@ -47,7 +47,7 @@ tests:
testString: assert(typeof tokenize === 'function', '<code>tokenize</code> is a function.');
- text: <code>tokenize</code> should return an array.
testString: assert(typeof tokenize('a', 'b', 'c') === 'object', '<code>tokenize</code> should return an array.');
- text: <code>tokenize('one^|uno||three^^^^|four^^^|^cuatro|', '|', '^') </code> should return ['one|uno', '', 'three^^', 'four^|cuatro', '']")
- text: <code>tokenize('one^|uno||three^^^^|four^^^|^cuatro|', '|', '^') </code> should return <code>['one|uno', '', 'three^^', 'four^|cuatro', '']</code>
testString: assert.deepEqual(tokenize(testStr1, '|', '^'), res1, "<code>tokenize('one^|uno||three^^^^|four^^^|^cuatro|', '|', '^') </code> should return ['one|uno', '', 'three^^', 'four^|cuatro', '']");
- text: <code>tokenize('a@&bcd&ef&&@@hi', '&', '@')</code> should return <code>['a&bcd', 'ef', '', '@hi']</code>
testString: assert.deepEqual(tokenize(testStr2, '&', '@'), res2, '<code>tokenize("a@&bcd&ef&&@@hi", "&", "@")</code> should return <code>["a&bcd", "ef", "", "@hi"]</code>');

View File

@ -33,11 +33,11 @@ tests:
testString: assert(typeof towerOfHanoi === 'function', '<code>towerOfHanoi</code> is a function.');
- text: <code>towerOfHanoi(3, ...)</code> should return 7 moves.
testString: assert(res3.length === 7, '<code>towerOfHanoi(3, ...)</code> should return 7 moves.');
- text: <code>towerOfHanoi(3, 'A', 'B', 'C')</code> should return [['A','B'],['A','C'],['B','C'],['A','B'],['C','A'],['C','B'],['A','B']].")
- text: <code>towerOfHanoi(3, 'A', 'B', 'C')</code> should return <code>[['A','B'],['A','C'],['B','C'],['A','B'],['C','A'],['C','B'],['A','B']]</code>
testString: assert.deepEqual(towerOfHanoi(3, 'A', 'B', 'C'), res3Moves, "<code>towerOfHanoi(3, 'A', 'B', 'C')</code> should return [['A','B'],['A','C'],['B','C'],['A','B'],['C','A'],['C','B'],['A','B']].");
- text: <code>towerOfHanoi(5, "X", "Y", "Z")</code> 10th move should be Y -> X.
testString: assert.deepEqual(res5[9], ['Y', 'X'], '<code>towerOfHanoi(5, "X", "Y", "Z")</code> 10th move should be Y -> X.');
- text: <code>towerOfHanoi(7, 'A', 'B', 'C')</code> first ten moves are [['A','B'],['A','C'],['B','C'],['A','B'],['C','A'],['C','B'],['A','B'],['A','C'],['B','C'],['B','A']].")
- text: <code>towerOfHanoi(7, 'A', 'B', 'C')</code> first ten moves are <code>[['A','B'],['A','C'],['B','C'],['A','B'],['C','A'],['C','B'],['A','B'],['A','C'],['B','C'],['B','A']]</code>
testString: assert.deepEqual(towerOfHanoi(7, 'A', 'B', 'C').slice(0, 10), res7First10Moves, "<code>towerOfHanoi(7, 'A', 'B', 'C')</code> first ten moves are [['A','B'],['A','C'],['B','C'],['A','B'],['C','A'],['C','B'],['A','B'],['A','C'],['B','C'],['B','A']].");
```