Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in pizza slices test #811

Open
rhoot opened this issue Dec 25, 2024 · 0 comments
Open

Error in pizza slices test #811

rhoot opened this issue Dec 25, 2024 · 0 comments

Comments

@rhoot
Copy link

rhoot commented Dec 25, 2024

The tests in the pizza-slices exercise has:

let biggest = biggestSlice(diameterA: "0", slicesA: "8", diameterB: "16 inches", slicesB: "8")
XCTAssertEqual(biggest, "Slice A is bigger")

First of all, I would have assumed that a pizza with a diameter of 0 is no pizza. But even if we consider that such a pizza might exist: A pizza with a diameter of 0 couldn't possibly have a larger per-slice area than a slice of a pizza with a diameter of 16", regardless of how many slices you cut the second pizza into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant