mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-07-16 21:27:57 +08:00
fix(curriculum): daily challenge 42 test (#62308)
This commit is contained in:
parent
0f0d91f50f
commit
923e6c4c7d
@ -24,7 +24,7 @@ Given a video size, a unit for the video size, a hard drive capacity, and a unit
|
||||
| 1 GB | 1000 MB |
|
||||
| 1 TB | 1000 GB |
|
||||
|
||||
For example, given `500`, `"MB"`, `100`, and `"GB` as arguments, determine how many 500 MB videos can fit on a 100 GB hard drive.
|
||||
For example, given `500`, `"MB"`, `100`, and `"GB"` as arguments, determine how many 500 MB videos can fit on a 100 GB hard drive.
|
||||
|
||||
# --hints--
|
||||
|
||||
@ -34,10 +34,10 @@ For example, given `500`, `"MB"`, `100`, and `"GB` as arguments, determine how m
|
||||
assert.equal(numberOfVideos(500, "MB", 100, "GB"), 200);
|
||||
```
|
||||
|
||||
`numberOfVideos(2000, "B", 1, "TB")` should return `"Invalid video unit"`.
|
||||
`numberOfVideos(1, "TB", 10, "TB")` should return `"Invalid video unit"`.
|
||||
|
||||
```js
|
||||
assert.equal(numberOfVideos(2000, "B", 1, "TB"), "Invalid video unit");
|
||||
assert.equal(numberOfVideos(1, "TB", 10, "TB"), "Invalid video unit");
|
||||
```
|
||||
|
||||
`numberOfVideos(2000, "MB", 100000, "MB")` should return `"Invalid drive unit"`.
|
||||
|
||||
@ -24,7 +24,7 @@ Given a video size, a unit for the video size, a hard drive capacity, and a unit
|
||||
| 1 GB | 1000 MB |
|
||||
| 1 TB | 1000 GB |
|
||||
|
||||
For example, given `500`, `"MB"`, `100`, and `"GB` as arguments, determine how many 500 MB videos can fit on a 100 GB hard drive.
|
||||
For example, given `500`, `"MB"`, `100`, and `"GB"` as arguments, determine how many 500 MB videos can fit on a 100 GB hard drive.
|
||||
|
||||
# --hints--
|
||||
|
||||
@ -37,12 +37,12 @@ TestCase().assertEqual(number_of_videos(500, "MB", 100, "GB"), 200)`)
|
||||
}})
|
||||
```
|
||||
|
||||
`number_of_videos(2000, "B", 1, "TB")` should return `"Invalid video unit"`.
|
||||
`number_of_videos(1, "TB", 10, "TB")` should return `"Invalid video unit"`.
|
||||
|
||||
```js
|
||||
({test: () => { runPython(`
|
||||
from unittest import TestCase
|
||||
TestCase().assertEqual(number_of_videos(2000, "B", 1, "TB"), "Invalid video unit")`)
|
||||
TestCase().assertEqual(number_of_videos(1, "TB", 10, "TB"), "Invalid video unit")`)
|
||||
}})
|
||||
```
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user