fix(curriculum): daily challenge 42 test (#62308)

This commit is contained in:
Tom 2025-09-22 08:57:47 -05:00 committed by GitHub
parent 0f0d91f50f
commit 923e6c4c7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -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"`.

View File

@ -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")`)
}})
```