Skip to content

Conversation

@marcostfermin
Copy link

No description provided.

eq = c.equation()
assert "x^2 + y^2" in eq
assert " - 2*x" in eq
assert " - 4*y" in eq
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you assert the radius as well x^2 + y^2 -2x -4y - 4 will be the circle equation right ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct, x² + y² - 2x - 4y - 4 = 0 simplifies to (x−1)² + (y−2)² = 9, so r = 3.
I’ve added an explicit radius assertion in the test to make this clear. See below.

@Lakshmikanth2001
Copy link
Contributor

this looks good as well

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

Successfully merging this pull request may close these issues.

3 participants