exercism / swift

Exercism exercises in Swift.
https://exercism.org/tracks/swift
MIT License
114 stars 159 forks source link

Freelancer Rates [Swift] - Test cases need to reflect new values #753

Closed sinchanmaitri closed 5 months ago

sinchanmaitri commented 5 months ago

There was an inconsistency in the instructions which was rectified(based on this discussion. But the test cases "testworkdaysLargebudget" and "testworkdaysShouldRound" need to be updated too with rounded down values.

P.S: I shall open a PR for this 👍 cc: @meatball133

meatball133 commented 5 months ago

I am unsure what you mean. For testworkdaysLargebudget:

8 80 0.9 = 576 25000 / 576 = 43.40...

Rounded down should be 43

As with the other one:

8 80 0.89 = 569.6 20000/ 569.6 = 35.11... Rounded down should be 35

sinchanmaitri commented 5 months ago

@meatball133 Apologies, should have thought this through. I am approaching the calculation in another manner, although it can give the same result. But, definitely there is a minor change in the final value, hence the difference in the rounded down value. Appreciate the prompt response 🙏