mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-08-31 01:14:08 +08:00
fix: update challenge 359 rounding test case (#69284)
Co-authored-by: Rikka-8964 <204355417+Rikka-8964@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -25,10 +25,10 @@ assert.equal(calculateHandicap([72, 72, 72], [72, 72, 72]), 0);
|
||||
assert.equal(calculateHandicap([80, 76, 78, 78], [72, 72, 72, 72]), 6);
|
||||
```
|
||||
|
||||
`calculateHandicap([42, 45, 46, 44], [36, 36, 36, 36])` should return `8.3`.
|
||||
`calculateHandicap([42, 45, 46, 45], [36, 36, 36, 36])` should return `8.5`.
|
||||
|
||||
```js
|
||||
assert.equal(calculateHandicap([42, 45, 46, 44], [36, 36, 36, 36]), 8.3);
|
||||
assert.equal(calculateHandicap([42, 45, 46, 45], [36, 36, 36, 36]), 8.5);
|
||||
```
|
||||
|
||||
`calculateHandicap([85, 80, 76, 79, 82], [72, 72, 72, 71, 71])` should return `8.8`.
|
||||
|
||||
+2
-2
@@ -31,12 +31,12 @@ TestCase().assertEqual(calculate_handicap([80, 76, 78, 78], [72, 72, 72, 72]), 6
|
||||
}})
|
||||
```
|
||||
|
||||
`calculate_handicap([42, 45, 46, 44], [36, 36, 36, 36])` should return `8.3`.
|
||||
`calculate_handicap([42, 45, 46, 45], [36, 36, 36, 36])` should return `8.5`.
|
||||
|
||||
```js
|
||||
({test: () => { runPython(`
|
||||
from unittest import TestCase
|
||||
TestCase().assertEqual(calculate_handicap([42, 45, 46, 44], [36, 36, 36, 36]), 8.3)`)
|
||||
TestCase().assertEqual(calculate_handicap([42, 45, 46, 45], [36, 36, 36, 36]), 8.5)`)
|
||||
}})
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user