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

[Swift 6]: Update Exercises batch 22 #816

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

meatball133
Copy link
Member

Includes:

  • Complex-Numbers
  • Poker
  • Saddle Points

All of the exercises have received a makeover, the but the most substantial one is the one for complex numbers and saddle points.

@meatball133 meatball133 added this to the Swift 6.0 milestone Dec 26, 2024
Copy link
Contributor

Hello 👋 Thanks for your PR.

This repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed.

If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track.

Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum.

(cc @exercism/cross-track-maintainers)

You will have to implement your own equality operator for the `ComplexNumber` object.
This will pose the challenge of comparing two floating point numbers.
It might be useful to use the method `isApproximatelyEqual(to:absoluteTolerance:)` which can be found in the [Numerics][swift-numberics] library.
With a given tolerance of `0.00001` should be enough to pass the tests.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
With a given tolerance of `0.00001` should be enough to pass the tests.
A given tolerance of `0.00001` should be enough to pass the tests.

This will pose the challenge of comparing two floating point numbers.
It might be useful to use the method `isApproximatelyEqual(to:absoluteTolerance:)` which can be found in the [Numerics][swift-numberics] library.
With a given tolerance of `0.00001` should be enough to pass the tests.
The library is already imported in the project so it is just to import it in your file.
Copy link
Member

Choose a reason for hiding this comment

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

This line is confusing. Does it mean the library is imported but the student needs to reference it in their code?

Copy link
Member Author

@meatball133 meatball133 Jan 3, 2025

Choose a reason for hiding this comment

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

The library is included in the project config file. But you also have to import it the file you are working in.

With a given tolerance of `0.00001` should be enough to pass the tests.
The library is already imported in the project so it is just to import it in your file.

You are aLso free to implement your own method to compare the two complex numbers.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
You are aLso free to implement your own method to compare the two complex numbers.
You are also free to implement your own method to compare the two complex numbers.

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.

2 participants