-
-
Notifications
You must be signed in to change notification settings - Fork 402
Darts exercise hint for sqrt workaround doesn't seem to work #1430
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
Comments
Hi @boabdilperez. As you noted yourself, |
@jiegillet I can't find the hints in problem-specs, where did you take them from? Are they really global? |
Oh no, you're right, I got mislead by something, they are not global -_- |
I was ultimately able to figure it out, but a bit less organically than I think is the intent of these exercises. Modifying those hints will be a big help to anyone else who comes along, I think. Thanks for looking into this y'all! |
By the way, did you see the hints in the online editor or in offline mode? I can't find them at all. |
I used the CLI but I see the hints in both. From the online editor there's
a small button in the lower left "Stuck? Get Help" and if you download the
test it's in HINTS.md in the top level of the directory created by the CLI
tool.
…--
Boabdil Perez
On Thu, Feb 1, 2024 at 10:35 PM Jie ***@***.***> wrote:
By the way, did you see the hints in the online editor or in offline mode?
I can't find them at all.
—
Reply to this email directly, view it on GitHub
<#1430 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI6Q6JC72NEKHC2ZIDX4VZLYRRUJTAVCNFSM6AAAAABCUST6LOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRSHAYDAMJXGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I see, for me it's "Stuck? Ask ChatGPT". I tried it, asked me which model I wanted, then I could see the hints. When I reloaded I saw ChatGPT 3.5's suggestions (which were not helpful, but my code already had the square root part done). I opened a PR, may I ask you to give it a review? |
I was just trying to solve the "Darts" exercise. The hints include the correct formula to get the distance from origin to any given coordinate on a plane, but the provided workaround for the lack of a native square root function in elixir doesn't seem to work. The spec for
Integer.pow()
is expecting integers for both the base and the exponent arguments. The spec forFloat.pow()
is explicitly expecting a float for the base, and a number for the exponent.For the first test case of (-9, 9)
Checking the example.ex in the repo, I see that neither
Integer.pow
orFloat.pow
were used there, but rather the erlang math library. I'm apologize if I am missing something else, as I'm not great at geometry OR elixir.The text was updated successfully, but these errors were encountered: