Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Scrutinized tests
Added useful assertion messages
Updated to latest version
Scrutinized tests
Added useful assertion messages
Changed function name to camelCase
You are close to the answer, you can observe the conner cases, and search for
Python boolean
.This comment is hidden because it contains spoiler information about the solution
It would be nice tell the user the quantity and price that results in incorrect output. Instead of this:
Try this:
Same on the fixed tests.
Also (cosmetic issues):
2) get rid of the //TODO comments at the top of the tests.
3) Change testExample() to testFixed()
Thanks for the translation candidate.
Cosmetic issues found during my review:
Get rid of these comments at the start of the sample tests and full tests:
// XCTest Spec Example:
// TODO: replace with your own tests (TDD), these are just how-to examples to get you started
Change testExample() to testFixed() (both in sample test and full tests)
I normally like to give meaningful test failure output but I'm not sure if there's a better way to do it here given we're solving an infinite loop problem
Here's my Swift translation checklist, based on a moderator reviewing my stuff heavily:
Minor stuff you should do for this translation:
Rename function to lower camel case to conform to Swift programming best practices.
Remove the 2-lines of //TODO sample comments from the top of the sample tests and full tests.
Please note that when a fork of your translation gets approved, then it's still you who gets the reward. So nothing lost here. So even if darrelroot's fork gets merged, you will get all the points (not many, but still :) )
Thank you very much!
I'm new to this and wanted to test out writing my own translations. What a miss from me writing this one. Much appreciated!
Here's updated tests from my fork. Feel free to incorporate in yours since you wrote the original translation and appear to still be active:
Consider the random tests:
If the first random is 1, and the second random is 1, then angle b is 0 degrees.
By comparison, the C translation lets the first angle range from 1 through 178, leaving 2 degrees for the 2nd and third angle.
->
clearly inclusive, no?
"A friend of mine takes the sequence of all numbers from 1 to n (where n > 0)."
Inclusive or exclusive?
This is a nice problem, I am stuck with how to make my code faster... Anyone have any suggestions for me? Writing in swift
There is also a double space in the middle there.
Loading more items...