cs50 / problems

Checks for check50
131 stars 218 forks source link

Allow rounding as well as truncating in `volume` #253

Open chriscarrollsmith opened 2 weeks ago

chriscarrollsmith commented 2 weeks ago

check50 cs50/problems/2024/x/volume returns failed tests if you use the round function after multiplying by the scaling factor. Rounding is arguably more correct than simply coercing the result back to an integer, which truncates the resulting number.

guyewhite commented 2 weeks ago

@yuliiazhukovetsHU Are you a pro at checks? I've actually never written one! I'd sure like to learn!