From 657f9c3ac74bfad939818a7325110d89e9b93542 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Mon, 6 Aug 2018 18:12:26 +0200 Subject: [PATCH 1/2] docs: Update documentation --- config/exercise_readme.go.tmpl | 8 +++ docs/RESOURCES.md | 29 +++++---- docs/TESTS.md | 4 +- exercises/accumulate/README.md | 8 +++ exercises/acronym/README.md | 8 +++ exercises/all-your-base/README.md | 8 +++ exercises/allergies/README.md | 8 +++ exercises/alphametics/README.md | 8 +++ exercises/anagram/README.md | 8 +++ exercises/armstrong-numbers/README.md | 10 +++- exercises/atbash-cipher/README.md | 8 +++ exercises/bank-account/README.md | 8 +++ exercises/beer-song/README.md | 8 +++ exercises/binary-search-tree/README.md | 8 +++ exercises/binary-search/README.md | 8 +++ exercises/binary/README.md | 8 +++ exercises/bob/README.md | 10 ++++ exercises/book-store/README.md | 8 +++ exercises/bowling/README.md | 8 +++ exercises/bracket-push/README.md | 13 +++- exercises/change/README.md | 8 +++ exercises/circular-buffer/README.md | 8 +++ exercises/clock/README.md | 14 +++++ exercises/collatz-conjecture/README.md | 8 +++ exercises/complex-numbers/README.md | 13 ++-- exercises/connect/README.md | 8 +++ exercises/crypto-square/README.md | 59 +++++++++++-------- exercises/custom-set/README.md | 14 ++++- exercises/diamond/README.md | 8 +++ exercises/difference-of-squares/README.md | 8 +++ exercises/diffie-hellman/README.md | 8 +++ exercises/dominoes/README.md | 8 +++ exercises/dot-dsl/README.md | 15 +++-- exercises/error-handling/README.md | 8 +++ exercises/etl/README.md | 8 +++ exercises/flatten-array/README.md | 8 +++ exercises/food-chain/README.md | 8 +++ exercises/forth/README.md | 8 +++ exercises/gigasecond/README.md | 8 +++ exercises/go-counting/README.md | 10 ++++ exercises/grade-school/README.md | 8 +++ exercises/grains/README.md | 8 +++ exercises/grep/README.md | 8 +++ exercises/hamming/README.md | 15 ++++- exercises/hangman/README.md | 8 +++ exercises/hello-world/README.md | 8 +++ exercises/hexadecimal/README.md | 8 +++ exercises/house/README.md | 8 +++ exercises/isbn-verifier/README.md | 8 +++ exercises/isogram/README.md | 8 +++ exercises/kindergarten-garden/README.md | 8 +++ exercises/largest-series-product/README.md | 8 +++ exercises/leap/README.md | 8 +++ exercises/ledger/README.md | 8 +++ exercises/linked-list/README.md | 8 +++ exercises/list-ops/README.md | 8 +++ exercises/luhn/README.md | 8 +++ exercises/markdown/README.md | 8 +++ exercises/matrix/README.md | 8 +++ exercises/meetup/README.md | 8 +++ exercises/minesweeper/README.md | 8 +++ exercises/nth-prime/README.md | 8 +++ exercises/nucleotide-count/README.md | 8 +++ exercises/ocr-numbers/README.md | 8 +++ exercises/octal/README.md | 8 +++ exercises/palindrome-products/README.md | 8 +++ exercises/pangram/README.md | 8 +++ exercises/parallel-letter-frequency/README.md | 8 +++ exercises/pascals-triangle/README.md | 8 +++ exercises/perfect-numbers/README.md | 8 +++ exercises/phone-number/README.md | 8 +++ exercises/pig-latin/README.md | 16 +++-- exercises/poker/README.md | 8 +++ exercises/pov/README.md | 8 +++ exercises/prime-factors/README.md | 8 +++ exercises/protein-translation/README.md | 8 +++ exercises/proverb/README.md | 8 +++ exercises/pythagorean-triplet/README.md | 8 +++ exercises/queen-attack/README.md | 8 +++ exercises/rail-fence-cipher/README.md | 8 +++ exercises/raindrops/README.md | 8 +++ exercises/rational-numbers/README.md | 27 ++++++++- exercises/react/README.md | 8 +++ exercises/rectangles/README.md | 8 +++ exercises/reverse-string/README.md | 8 +++ exercises/rna-transcription/README.md | 8 +++ exercises/robot-name/README.md | 8 +++ exercises/robot-simulator/README.md | 8 +++ exercises/roman-numerals/README.md | 8 +++ exercises/rotational-cipher/README.md | 8 +++ exercises/run-length-encoding/README.md | 8 +++ exercises/saddle-points/README.md | 8 +++ exercises/say/README.md | 10 +++- exercises/scale-generator/README.md | 29 ++++----- exercises/scrabble-score/README.md | 8 +++ exercises/secret-handshake/README.md | 8 +++ exercises/series/README.md | 20 +++++-- exercises/sgf-parsing/README.md | 8 +++ exercises/sieve/README.md | 16 ++++- exercises/simple-cipher/README.md | 8 +++ exercises/simple-linked-list/README.md | 8 +++ exercises/space-age/README.md | 8 +++ exercises/spiral-matrix/README.md | 8 +++ exercises/strain/README.md | 8 +++ exercises/sublist/README.md | 8 +++ exercises/sum-of-multiples/README.md | 8 +++ exercises/tournament/README.md | 8 +++ exercises/transpose/README.md | 8 +++ exercises/tree-building/README.md | 8 +++ exercises/triangle/README.md | 8 +++ exercises/trinary/README.md | 8 +++ exercises/twelve-days/README.md | 19 ++++++ exercises/two-bucket/README.md | 10 +++- exercises/two-fer/README.md | 8 +++ exercises/variable-length-quantity/README.md | 8 +++ exercises/word-count/README.md | 8 +++ exercises/word-search/README.md | 8 +++ exercises/wordy/README.md | 8 +++ exercises/yacht/README.md | 49 ++++++++++----- exercises/zebra-puzzle/README.md | 8 +++ exercises/zipper/README.md | 8 +++ 121 files changed, 1102 insertions(+), 100 deletions(-) diff --git a/config/exercise_readme.go.tmpl b/config/exercise_readme.go.tmpl index 9027f95eee..927c779999 100644 --- a/config/exercise_readme.go.tmpl +++ b/config/exercise_readme.go.tmpl @@ -4,6 +4,14 @@ {{- with .Hints }} {{ . }} {{ end }} +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). {{ with .Spec.Credits }} ## Source diff --git a/docs/RESOURCES.md b/docs/RESOURCES.md index 07bdb3abaa..a4b52c4d78 100644 --- a/docs/RESOURCES.md +++ b/docs/RESOURCES.md @@ -1,23 +1,28 @@ ## Recommended Learning Resources ### Blogs -* The official [.NET blog](https://blogs.msdn.microsoft.com/dotnet/) has lots of interesting C# articles, ranging from beginner to expert difficulty. -* Scott Hanselman's [blog](http://www.hanselman.com/blog/) is an active, well written blog on a wide variety of C# and .NET related subjects. -* Eric Lippert's [Fabulous adventures in coding](https://ericlippert.com/) is a brilliant C# blog, although his subjects are usually quite advanced. -* The [C#/.NET Little Wonders & Little Pitfalls](http://geekswithblogs.net/BlackRabbitCoder/archive/2015/04/02/c.net-little-wonders-amp-little-pitfalls-the-complete-collection.aspx) posts by James Michael Hare contains some fantastic posts on less known C# features. + +- The official [.NET blog](https://blogs.msdn.microsoft.com/dotnet/) has lots of interesting C# articles, ranging from beginner to expert difficulty. +- Scott Hanselman's [blog](http://www.hanselman.com/blog/) is an active, well written blog on a wide variety of C# and .NET related subjects. +- Eric Lippert's [Fabulous adventures in coding](https://ericlippert.com/) is a brilliant C# blog, although his subjects are usually quite advanced. +- The [C#/.NET Little Wonders & Little Pitfalls](http://geekswithblogs.net/BlackRabbitCoder/archive/2015/04/02/c.net-little-wonders-amp-little-pitfalls-the-complete-collection.aspx) posts by James Michael Hare contains some fantastic posts on less known C# features. ### Social media -* [StackOverflow ](http://stackoverflow.com/questions/tagged/c%23) can be used to search for your problem and see if it has been answered already. You can also ask and answer questions. -* [/r/csharp](https://www.reddit.com/r/csharp) is the C# subreddit. -* [\@dotnet](https://twitter.com/DotNet) is the official .NET Twitter account. -* [Gitter](https://gitter.im/exercism/xcsharp) is the C# Gitter room, go here to get support and ask questions related to the C# track. + +- [StackOverflow ](http://stackoverflow.com/questions/tagged/c%23) can be used to search for your problem and see if it has been answered already. You can also ask and answer questions. +- [/r/csharp](https://www.reddit.com/r/csharp) is the C# subreddit. +- [@dotnet](https://twitter.com/DotNet) is the official .NET Twitter account. +- [Gitter](https://gitter.im/exercism/xcsharp) is the C# Gitter room, go here to get support and ask questions related to the C# track. ### Videos -* In [On .NET](https://www.youtube.com/watch?v=GpLU0UdcGic&list=PL4Sf58qFxdyQuzB1mH5kln_otKpsIuoCO), Bertrand Le Roy interviews people on a wide variety of C#/.NET related subjects. -* There are several great [C# courses](https://www.pluralsight.com/search?q=*&categories=course&roles=software-development%7C&subjects=c%23) on PluralSight. The downside: PluralSight is a paid service, but you can request a [free trial](https://www.pluralsight.com/pricing). + +- In [On .NET](https://www.youtube.com/watch?v=GpLU0UdcGic&list=PL4Sf58qFxdyQuzB1mH5kln_otKpsIuoCO), Bertrand Le Roy interviews people on a wide variety of C#/.NET related subjects. +- There are several great [C# courses](https://www.pluralsight.com/search?q=*&categories=course&roles=software-development%7C&subjects=c%23) on PluralSight. The downside: PluralSight is a paid service, but you can request a [free trial](https://www.pluralsight.com/pricing). ### Podcasts -* [.NET Rocks](https://www.dotnetrocks.com/) is a very nice .NET podcast with great content. + +- [.NET Rocks](https://www.dotnetrocks.com/) is a very nice .NET podcast with great content. ### Books -* [Expert C# 5.0](http://www.apress.com/us/book/9781430248606) + +- [Expert C# 5.0](http://www.apress.com/us/book/9781430248606) diff --git a/docs/TESTS.md b/docs/TESTS.md index 343bd502a7..ee8166346e 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -17,5 +17,5 @@ To help you get started, each exercise comes with a stub implementation file. Yo You should be able to solve most exercises without using any external packages. However, for the exercises where you do want to use an external package, you can add it to your project by running the following command: ```bash -dotnet add package -``` \ No newline at end of file +dotnet add package [package-name] +``` diff --git a/exercises/accumulate/README.md b/exercises/accumulate/README.md index 5daf60b3be..81cf1e4aec 100644 --- a/exercises/accumulate/README.md +++ b/exercises/accumulate/README.md @@ -28,6 +28,14 @@ Solve this one yourself using other basic tools instead. ## Hints This exercise requires you to write an extension method. For more information, see [this page](https://msdn.microsoft.com/en-us//library/bb383977.aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/acronym/README.md b/exercises/acronym/README.md index ab53254249..2f8eba5096 100644 --- a/exercises/acronym/README.md +++ b/exercises/acronym/README.md @@ -7,6 +7,14 @@ Techies love their TLA (Three Letter Acronyms)! Help generate some jargon by writing a program that converts a long name like Portable Network Graphics to its acronym (PNG). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/all-your-base/README.md b/exercises/all-your-base/README.md index 03074912e8..0f5443161b 100644 --- a/exercises/all-your-base/README.md +++ b/exercises/all-your-base/README.md @@ -31,6 +31,14 @@ I think you got the idea! *Yes. Those three numbers above are exactly the same. Congratulations!* +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/allergies/README.md b/exercises/allergies/README.md index 7002942d09..94763883a0 100644 --- a/exercises/allergies/README.md +++ b/exercises/allergies/README.md @@ -32,6 +32,14 @@ score is 257, your program should only report the eggs (1) allergy. ## Hints This exercise requires you to use bitwise operations. For more information, see [this page](https://msdn.microsoft.com/en-us/library/6a71f45d.aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/alphametics/README.md b/exercises/alphametics/README.md index 8b4e7b9d54..2dc28f6eff 100644 --- a/exercises/alphametics/README.md +++ b/exercises/alphametics/README.md @@ -38,6 +38,14 @@ Try to find a more sophisticated solution. - Hint: You could try the column-wise addition algorithm that is usually taught in school. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/anagram/README.md b/exercises/anagram/README.md index 8f8058c0a9..881da560e1 100644 --- a/exercises/anagram/README.md +++ b/exercises/anagram/README.md @@ -6,6 +6,14 @@ Given `"listen"` and a list of candidates like `"enlists" "google" "inlets" "banana"` the program should return a list containing `"inlets"`. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/armstrong-numbers/README.md b/exercises/armstrong-numbers/README.md index 29be991038..3ac8575bcd 100644 --- a/exercises/armstrong-numbers/README.md +++ b/exercises/armstrong-numbers/README.md @@ -5,12 +5,20 @@ An [Armstrong number](https://en.wikipedia.org/wiki/Narcissistic_number) is a nu For example: - 9 is an Armstrong number, because `9 = 9^1 = 9` -- 10 is *not* an Armstrong number, because `10 != 1^2 + 0^2 = 2` +- 10 is *not* an Armstrong number, because `10 != 1^2 + 0^2 = 1` - 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153` - 154 is *not* an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190` Write some code to determine whether a number is an Armstrong number. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/atbash-cipher/README.md b/exercises/atbash-cipher/README.md index b6e9c4305c..65f315bd0b 100644 --- a/exercises/atbash-cipher/README.md +++ b/exercises/atbash-cipher/README.md @@ -28,6 +28,14 @@ things based on word boundaries. - Decoding `gvhg` gives `test` - Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog` +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/bank-account/README.md b/exercises/bank-account/README.md index 4f74fdcac2..a8060faebf 100644 --- a/exercises/bank-account/README.md +++ b/exercises/bank-account/README.md @@ -31,6 +31,14 @@ This exercise requires you to handle data related to currency and money. A norma Note though that you then only store the numeric value of a currency. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/beer-song/README.md b/exercises/beer-song/README.md index 0d38cdffec..a7c21ca651 100644 --- a/exercises/beer-song/README.md +++ b/exercises/beer-song/README.md @@ -323,6 +323,14 @@ experiment make the code better? Worse? Did you learn anything from it? ## Hints - Try to capture the structure of the song in your code, where you build up the song by composing its parts. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/binary-search-tree/README.md b/exercises/binary-search-tree/README.md index a030b730fe..6bc5e01b7d 100644 --- a/exercises/binary-search-tree/README.md +++ b/exercises/binary-search-tree/README.md @@ -53,6 +53,14 @@ And if we then added 1, 5, and 7, it would look like this / \ / \ 1 3 5 7 +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/binary-search/README.md b/exercises/binary-search/README.md index b436f76ee9..22a9d8a8b3 100644 --- a/exercises/binary-search/README.md +++ b/exercises/binary-search/README.md @@ -34,6 +34,14 @@ A binary search halves the number of items to check with each iteration, so locating an item (or determining its absence) takes logarithmic time. A binary search is a dichotomic divide and conquer search algorithm. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/binary/README.md b/exercises/binary/README.md index fbbb63573c..68a7d4a41e 100644 --- a/exercises/binary/README.md +++ b/exercises/binary/README.md @@ -30,6 +30,14 @@ Binary is similar, but uses powers of 2 rather than powers of 10. So: `101 => 1*2^2 + 0*2^1 + 1*2^0 => 1*4 + 0*2 + 1*1 => 4 + 1 => 5 base 10`. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/bob/README.md b/exercises/bob/README.md index 6cb2765df8..ed9757d6a4 100644 --- a/exercises/bob/README.md +++ b/exercises/bob/README.md @@ -13,6 +13,16 @@ anything. He answers 'Whatever.' to anything else. +Bob's conversational partner is a purist when it comes to written communication and always follows normal rules regarding sentence punctuation in English. + +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/book-store/README.md b/exercises/book-store/README.md index 6234ac3034..a9b846b693 100644 --- a/exercises/book-store/README.md +++ b/exercises/book-store/README.md @@ -67,6 +67,14 @@ For a total of $51.20 And $51.20 is the price with the biggest discount. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/bowling/README.md b/exercises/bowling/README.md index 9ec8055975..d76d74ce71 100644 --- a/exercises/bowling/README.md +++ b/exercises/bowling/README.md @@ -60,6 +60,14 @@ support two operations: * `score() : int` is called only at the very end of the game. It returns the total score for that game. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/bracket-push/README.md b/exercises/bracket-push/README.md index 32998c40fc..9bb5f67158 100644 --- a/exercises/bracket-push/README.md +++ b/exercises/bracket-push/README.md @@ -1,8 +1,17 @@ # Bracket Push -Given a string containing brackets `[]`, braces `{}` and parentheses `()`, -verify that all the pairs are matched and nested correctly. +Given a string containing brackets `[]`, braces `{}`, parentheses `()`, +or any combination thereof, verify that any and all pairs are matched +and nested correctly. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/change/README.md b/exercises/change/README.md index c1cadd5d24..4a1b6dfda8 100644 --- a/exercises/change/README.md +++ b/exercises/change/README.md @@ -16,6 +16,14 @@ that the sum of the coins' value would equal the correct amount of change. - Can you ask for negative change? - Can you ask for a change value smaller than the smallest coin value? +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/circular-buffer/README.md b/exercises/circular-buffer/README.md index a6c01ceb00..22896642b4 100644 --- a/exercises/circular-buffer/README.md +++ b/exercises/circular-buffer/README.md @@ -50,6 +50,14 @@ the buffer is once again full. [D][7][8][9][A][B][C] +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/clock/README.md b/exercises/clock/README.md index af3d2a3faf..45cddafd7b 100644 --- a/exercises/clock/README.md +++ b/exercises/clock/README.md @@ -6,6 +6,20 @@ You should be able to add and subtract minutes to it. Two clocks that represent the same time should be equal to each other. +## Hints +This exercise requires you to implements a type-specific method for determining equality of instances. +For more information, see [this page] +(https://docs.microsoft.com/en-us/dotnet/core/api/System.IEquatable-1) . + + +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/collatz-conjecture/README.md b/exercises/collatz-conjecture/README.md index afc22167a7..47b4ece723 100644 --- a/exercises/collatz-conjecture/README.md +++ b/exercises/collatz-conjecture/README.md @@ -26,6 +26,14 @@ Starting with n = 12, the steps would be as follows: Resulting in 9 steps. So for input n = 12, the return value would be 9. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/complex-numbers/README.md b/exercises/complex-numbers/README.md index df2f72e77d..bd5a32d349 100644 --- a/exercises/complex-numbers/README.md +++ b/exercises/complex-numbers/README.md @@ -19,10 +19,7 @@ The reciprocal of a non-zero complex number is Dividing a complex number `a + i * b` by another `c + i * d` gives: `(a + i * b) / (c + i * d) = (a * c + b * d)/(c^2 + d^2) + (b * c - a * d)/(c^2 + d^2) * i`. -Exponent of a complex number can be expressed as -`exp(a + i * b) = exp(a) * exp(i * b)`, -and the last term is given by Euler's formula `exp(i * b) = cos(b) + i * sin(b)`. - +Raising e to a complex exponent can be expressed as `e^(a + i * b) = e^a * e^(i * b)`, the last term of which is given by Euler's formula `e^(i * b) = cos(b) + i * sin(b)`. Implement the following operations: - addition, subtraction, multiplication and division of two complex numbers, @@ -31,6 +28,14 @@ Implement the following operations: Assume the programming language you are using does not have an implementation of complex numbers. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/connect/README.md b/exercises/connect/README.md index fe03c8e191..65fc77ffe7 100644 --- a/exercises/connect/README.md +++ b/exercises/connect/README.md @@ -30,6 +30,14 @@ the representation passed to your code): the above example `O` has made a connection from left to right but nobody has won since `O` didn't connect top and bottom. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/crypto-square/README.md b/exercises/crypto-square/README.md index d594bcb22a..1e381a9ef9 100644 --- a/exercises/crypto-square/README.md +++ b/exercises/crypto-square/README.md @@ -12,11 +12,15 @@ regarded as forming a rectangle when printed with intervening newlines. For example, the sentence -> If man was meant to stay on the ground, god would have given us roots. +```text +"If man was meant to stay on the ground, god would have given us roots." +``` is normalized to: -> ifmanwasmeanttostayonthegroundgodwouldhavegivenusroots +```text +"ifmanwasmeanttostayonthegroundgodwouldhavegivenusroots" +``` The plaintext should be organized in to a rectangle. The size of the rectangle (`r x c`) should be decided by the length of the message, @@ -27,13 +31,13 @@ Our normalized text is 54 characters long, dictating a rectangle with `c = 8` and `r = 7`: ```text -ifmanwas -meanttos -tayonthe -groundgo -dwouldha -vegivenu -sroots +"ifmanwas" +"meanttos" +"tayonthe" +"groundgo" +"dwouldha" +"vegivenu" +"sroots " ``` The coded message is obtained by reading down the columns going left to @@ -42,33 +46,40 @@ right. The message above is coded as: ```text -imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau +"imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau" ``` -Output the encoded text in chunks. Phrases that fill perfect rectangles -`(r X c)` should be output `c` chunks of `r` length, separated by spaces. -Phrases that do not fill perfect rectangles will have `n` empty spaces. -Those spaces should be distributed evenly, added to the end of the last -`n` chunks. +Output the encoded text in chunks that fill perfect rectangles `(r X c)`, +with `c` chunks of `r` length, separated by spaces. For phrases that are +`n` characters short of the perfect rectangle, pad each of the last `n` +chunks with a single trailing space. ```text -imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau +"imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau " ``` Notice that were we to stack these, we could visually decode the cyphertext back in to the original message: ```text -imtgdvs -fearwer -mayoogo -anouuio -ntnnlvt -wttddes -aohghn -sseoau +"imtgdvs" +"fearwer" +"mayoogo" +"anouuio" +"ntnnlvt" +"wttddes" +"aohghn " +"sseoau " ``` +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/custom-set/README.md b/exercises/custom-set/README.md index df6902b536..6b474c2f62 100644 --- a/exercises/custom-set/README.md +++ b/exercises/custom-set/README.md @@ -8,11 +8,19 @@ works internally doesn't matter, as long as it behaves like a set of unique elements. ## Hints -This exercise requires you to implements a type-specific method for determining equality of instances. -For more information, see [this page] -(https://docs.microsoft.com/en-us/dotnet/core/api/System.IEquatable-1) . +This exercise requires you to create custom equality comparison logic. +For more information, see [this page](https://docs.microsoft.com/en-us/dotnet/api/system.object.equals?view=netcore-2.0#System_Object_Equals_System_Object_). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). + ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/diamond/README.md b/exercises/diamond/README.md index de6a266eeb..7fdac986d0 100644 --- a/exercises/diamond/README.md +++ b/exercises/diamond/README.md @@ -64,6 +64,14 @@ In order to facilitate propery-based testing, the tests in this exercise leverag If you would like more information on property-based testing, see [this article](http://www.erikschierboom.com/2016/02/22/property-based-testing/). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/difference-of-squares/README.md b/exercises/difference-of-squares/README.md index ebc022e649..783c3d24d7 100644 --- a/exercises/difference-of-squares/README.md +++ b/exercises/difference-of-squares/README.md @@ -17,6 +17,14 @@ This exercise requires you to process a collection of data. You can simplify you For more information, see [this page] (https://docs.microsoft.com/en-us/dotnet/articles/standard/using-linq). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/diffie-hellman/README.md b/exercises/diffie-hellman/README.md index 30cff24711..4207867e6b 100644 --- a/exercises/diffie-hellman/README.md +++ b/exercises/diffie-hellman/README.md @@ -42,6 +42,14 @@ This exercise requires you to perform calculations on large numbers. To correctl [BigInteger](https://msdn.microsoft.com/en-us/library/system.numerics.biginteger(v=vs.110).aspx) struct is used. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/dominoes/README.md b/exercises/dominoes/README.md index 30fb06e489..b8d224c943 100644 --- a/exercises/dominoes/README.md +++ b/exercises/dominoes/README.md @@ -14,6 +14,14 @@ For stones `[1|2]`, `[4|1]` and `[2|3]` the resulting chain is not valid: `[4|1] Some test cases may use duplicate stones in a chain solution, assume that multiple Domino sets are being used. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/dot-dsl/README.md b/exercises/dot-dsl/README.md index a25df3553c..218c2e2382 100644 --- a/exercises/dot-dsl/README.md +++ b/exercises/dot-dsl/README.md @@ -6,10 +6,9 @@ A [Domain Specific Language (DSL)](https://en.wikipedia.org/wiki/Domain-specific_language) is a small language optimized for a specific domain. -For example the dot language of [Graphviz](http://graphviz.org) allows -you to write a textual description of a graph which is then transformed -into a picture by one of the graphviz tools (such as `dot`). A simple -graph looks like this: +For example the [DOT language](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) allows +you to write a textual description of a graph which is then transformed into a picture by one of +the [Graphviz](http://graphviz.org/) tools (such as `dot`). A simple graph looks like this: graph { graph [bgcolor="yellow"] @@ -27,6 +26,14 @@ Create a DSL similar to the dot language. ## Hints This exercise requires you to implement classes with a custom equality check. For more information, see [this page](https://msdn.microsoft.com/en-us/library/bsc2ak47(v=vs.110).aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/error-handling/README.md b/exercises/error-handling/README.md index 3a393bec48..c18e9d59ae 100644 --- a/exercises/error-handling/README.md +++ b/exercises/error-handling/README.md @@ -9,6 +9,14 @@ This exercise requires you to handle various errors. Because error handling is rather programming language specific you'll have to refer to the tests for your track to see what's exactly required. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/etl/README.md b/exercises/etl/README.md index 91070393d1..d0026adff2 100644 --- a/exercises/etl/README.md +++ b/exercises/etl/README.md @@ -46,6 +46,14 @@ variety of languages, each with its own unique scoring table. For example, an "E" is scored at 2 in the Māori-language version of the game while being scored at 4 in the Hawaiian-language version. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/flatten-array/README.md b/exercises/flatten-array/README.md index 3a73f3127e..e8e0b201da 100644 --- a/exercises/flatten-array/README.md +++ b/exercises/flatten-array/README.md @@ -10,6 +10,14 @@ input: [1,[2,3,null,4],[null],5] output: [1,2,3,4,5] +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/food-chain/README.md b/exercises/food-chain/README.md index 2164b57baa..6b07114639 100644 --- a/exercises/food-chain/README.md +++ b/exercises/food-chain/README.md @@ -67,6 +67,14 @@ She's dead, of course! - Try to capture the structure of the song in your code, where you build up the song by composing its parts. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/forth/README.md b/exercises/forth/README.md index a4c905efaf..61df780684 100644 --- a/exercises/forth/README.md +++ b/exercises/forth/README.md @@ -29,6 +29,14 @@ Words are case-insensitive. - To parse the text, you could try to use the [Sprache](https://github.com/sprache/Sprache/blob/develop/README.md) library. You can also find a good tutorial [here](https://www.thomaslevesque.com/2017/02/23/easy-text-parsing-in-c-with-sprache/). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/gigasecond/README.md b/exercises/gigasecond/README.md index d904b0f70d..447f456cc6 100644 --- a/exercises/gigasecond/README.md +++ b/exercises/gigasecond/README.md @@ -4,6 +4,14 @@ Calculate the moment when someone has lived for 10^9 seconds. A gigasecond is 10^9 (1,000,000,000) seconds. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/go-counting/README.md b/exercises/go-counting/README.md index 774f83cf73..a2b43da091 100644 --- a/exercises/go-counting/README.md +++ b/exercises/go-counting/README.md @@ -11,6 +11,8 @@ Write a function that determines the territory of each player. You may assume that any stones that have been stranded in enemy territory have already been taken off the board. +Write a function that determines the territory which includes a specified coordinate. + Multiple empty intersections may be encircled at once and for encircling only horizontal and vertical neighbours count. In the following diagram the stones which matter are marked "O" and the stones that don't are @@ -33,6 +35,14 @@ For more information see [wikipedia](https://en.wikipedia.org/wiki/Go_%28game%29) or [Sensei's Library](http://senseis.xmp.net/). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/grade-school/README.md b/exercises/grade-school/README.md index 4944839e13..4539dbb345 100644 --- a/exercises/grade-school/README.md +++ b/exercises/grade-school/README.md @@ -34,6 +34,14 @@ are some additional things you could try: Then please share your thoughts in a comment on the submission. Did this experiment make the code better? Worse? Did you learn anything from it? +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/grains/README.md b/exercises/grains/README.md index d6367d5905..53bbef0f68 100644 --- a/exercises/grains/README.md +++ b/exercises/grains/README.md @@ -26,6 +26,14 @@ are some additional things you could try: Then please share your thoughts in a comment on the submission. Did this experiment make the code better? Worse? Did you learn anything from it? +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/grep/README.md b/exercises/grep/README.md index e53ebbeab9..fe218abc93 100644 --- a/exercises/grep/README.md +++ b/exercises/grep/README.md @@ -64,6 +64,14 @@ The `grep` command should support multiple flags at once. For example, running `grep -l -v "hello" file1.txt file2.txt` should print the names of files that do not contain the string "hello". +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/hamming/README.md b/exercises/hamming/README.md index fb92047a3d..0751c24119 100644 --- a/exercises/hamming/README.md +++ b/exercises/hamming/README.md @@ -31,10 +31,19 @@ The Hamming distance between these two DNA strands is 7. # Implementation notes -The Hamming distance is only defined for sequences of equal length. This means -that based on the definition, each language could deal with getting sequences -of equal length differently. +The Hamming distance is only defined for sequences of equal length, so +an attempt to calculate it between sequences of different lengths should +not work. The general handling of this situation (e.g., raising an +exception vs returning a special value) may differ between languages. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/hangman/README.md b/exercises/hangman/README.md index 3919bb8f95..3e9ef55927 100644 --- a/exercises/hangman/README.md +++ b/exercises/hangman/README.md @@ -22,6 +22,14 @@ This exercise requires you to work with events. For more information, see [this (https://docs.microsoft.com/en-us/dotnet/articles/csharp/programming-guide/events/) . +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/hello-world/README.md b/exercises/hello-world/README.md index 2910d2a0f3..7e05640e4e 100644 --- a/exercises/hello-world/README.md +++ b/exercises/hello-world/README.md @@ -14,6 +14,14 @@ The objectives are simple: If everything goes well, you will be ready to fetch your first real exercise. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/hexadecimal/README.md b/exercises/hexadecimal/README.md index b0ebfa3185..a184074624 100644 --- a/exercises/hexadecimal/README.md +++ b/exercises/hexadecimal/README.md @@ -7,6 +7,14 @@ teal: 008080, navy: 000080). The program should handle invalid hexadecimal strings. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/house/README.md b/exercises/house/README.md index c0f2c71f42..8f760fb9e7 100644 --- a/exercises/house/README.md +++ b/exercises/house/README.md @@ -109,6 +109,14 @@ that lay in the house that Jack built. Try to capture the structure of the song in your code, where you build up the song by composing its parts. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/isbn-verifier/README.md b/exercises/isbn-verifier/README.md index 7720eb7c7f..83c1d48727 100644 --- a/exercises/isbn-verifier/README.md +++ b/exercises/isbn-verifier/README.md @@ -40,6 +40,14 @@ Now, it's even trickier since the check digit of an ISBN-10 may be 'X' (represen * Generate a valid ISBN-13 from the input ISBN-10 (and maybe verify it again with a derived verifier). * Generate valid ISBN, maybe even from a given starting ISBN. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/isogram/README.md b/exercises/isogram/README.md index 48b34e909a..a3ea034496 100644 --- a/exercises/isogram/README.md +++ b/exercises/isogram/README.md @@ -13,6 +13,14 @@ Examples of isograms: The word *isograms*, however, is not an isogram, because the s repeats. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/kindergarten-garden/README.md b/exercises/kindergarten-garden/README.md index fa9baa80b6..c19ea99f29 100644 --- a/exercises/kindergarten-garden/README.md +++ b/exercises/kindergarten-garden/README.md @@ -59,6 +59,14 @@ While asking for Bob's plants would yield: - Clover, grass, clover, clover +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/largest-series-product/README.md b/exercises/largest-series-product/README.md index 39d1f107d4..dacc443119 100644 --- a/exercises/largest-series-product/README.md +++ b/exercises/largest-series-product/README.md @@ -13,6 +13,14 @@ in the input; the digits need not be *numerically consecutive*. For the input `'73167176531330624919225119674426574742355349194934'`, the largest product for a series of 6 digits is 23520. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/leap/README.md b/exercises/leap/README.md index 09d958894d..d37e58fc38 100644 --- a/exercises/leap/README.md +++ b/exercises/leap/README.md @@ -26,6 +26,14 @@ phenomenon, go watch [this youtube video][video]. [video]: http://www.youtube.com/watch?v=xX96xng7sAE +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/ledger/README.md b/exercises/ledger/README.md index 3e205bddbb..05661d95ae 100644 --- a/exercises/ledger/README.md +++ b/exercises/ledger/README.md @@ -14,6 +14,14 @@ working version. Version control tools like git can help here as well. Please keep a log of what changes you've made and make a comment on the exercise containing that log, this will help reviewers. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/linked-list/README.md b/exercises/linked-list/README.md index d3acc69f91..b7aba69f46 100644 --- a/exercises/linked-list/README.md +++ b/exercises/linked-list/README.md @@ -27,6 +27,14 @@ empty list. If you want to know more about linked lists, check [Wikipedia](https://en.wikipedia.org/wiki/Linked_list). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/list-ops/README.md b/exercises/list-ops/README.md index d7b9c46f1f..688416ce2d 100644 --- a/exercises/list-ops/README.md +++ b/exercises/list-ops/README.md @@ -9,6 +9,14 @@ without using existing functions. ## Hints The `Foldl` and `Foldr` methods are "fold" functions, which is a concept well-known in the functional programming world, but less so in the object-oriented one. If you'd like more background information, check out this [fold](https://en.wikipedia.org/wiki/Fold_(higher-order_function)) page. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/luhn/README.md b/exercises/luhn/README.md index e95c78bbef..c81104b958 100644 --- a/exercises/luhn/README.md +++ b/exercises/luhn/README.md @@ -64,6 +64,14 @@ Sum the digits 57 is not evenly divisible by 10, so this number is not valid. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/markdown/README.md b/exercises/markdown/README.md index 6ea7c3c41c..0f65edf82f 100644 --- a/exercises/markdown/README.md +++ b/exercises/markdown/README.md @@ -18,6 +18,14 @@ important thing is to make the code better! For this exercise the following C# feature comes in handy: - [String Interpolation](https://msdn.microsoft.com/en-us/library/dn961160.aspx) (C# 6 and up). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/matrix/README.md b/exercises/matrix/README.md index ed020185fb..38c24d91f6 100644 --- a/exercises/matrix/README.md +++ b/exercises/matrix/README.md @@ -40,6 +40,14 @@ And its columns: - 8, 3, 6 - 7, 2, 7 +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/meetup/README.md b/exercises/meetup/README.md index 2a8b6eb06b..19befd700d 100644 --- a/exercises/meetup/README.md +++ b/exercises/meetup/README.md @@ -26,6 +26,14 @@ Given examples of a meetup dates, each containing a month, day, year, and descriptor calculate the date of the actual meetup. For example, if given "The first Monday of January 2017", the correct meetup date is 2017/1/2. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/minesweeper/README.md b/exercises/minesweeper/README.md index f663d1e374..4b8426ee2c 100644 --- a/exercises/minesweeper/README.md +++ b/exercises/minesweeper/README.md @@ -26,6 +26,14 @@ into this: | 111 | +-----+ +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/nth-prime/README.md b/exercises/nth-prime/README.md index 5670c4b938..005e94d52c 100644 --- a/exercises/nth-prime/README.md +++ b/exercises/nth-prime/README.md @@ -16,6 +16,14 @@ See [this article](https://blogs.msdn.microsoft.com/pedram/2007/06/02/lazy-evalu Note: to help speedup calculation, you should not check numbers which you know beforehand will never be prime. For more information, see the [Sieve of Eratosthenes](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/nucleotide-count/README.md b/exercises/nucleotide-count/README.md index 54b50afe09..eb8b9ac5c3 100644 --- a/exercises/nucleotide-count/README.md +++ b/exercises/nucleotide-count/README.md @@ -16,6 +16,14 @@ Here is an analogy: This exercise requires the use of a Dictionary. For more information see [this page.](https://msdn.microsoft.com/en-us/library/s4ys34ea(v=vs.110).aspx) +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/ocr-numbers/README.md b/exercises/ocr-numbers/README.md index d5c63660d6..9c60239e9c 100644 --- a/exercises/ocr-numbers/README.md +++ b/exercises/ocr-numbers/README.md @@ -78,6 +78,14 @@ Update your program to handle multiple numbers, one per line. When converting se Is converted to "123,456,789" +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/octal/README.md b/exercises/octal/README.md index e2330f3baa..bb178be031 100644 --- a/exercises/octal/README.md +++ b/exercises/octal/README.md @@ -46,6 +46,14 @@ So: = 155 ``` +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/palindrome-products/README.md b/exercises/palindrome-products/README.md index 99e683e598..1ee214d01d 100644 --- a/exercises/palindrome-products/README.md +++ b/exercises/palindrome-products/README.md @@ -37,6 +37,14 @@ The largest palindrome product is `9009`. Its factors are `(91, 99)`. For this exercise, you will need to create a set of factors using tuples. For more information on tuples, see [this link](https://msdn.microsoft.com/en-us/library/system.tuple(v=vs.110).aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/pangram/README.md b/exercises/pangram/README.md index 14e4fd7638..c9c3a65eb9 100644 --- a/exercises/pangram/README.md +++ b/exercises/pangram/README.md @@ -8,6 +8,14 @@ The best known English pangram is: The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case insensitive. Input will not contain non-ASCII symbols. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/parallel-letter-frequency/README.md b/exercises/parallel-letter-frequency/README.md index 584d843641..45ffc2553c 100644 --- a/exercises/parallel-letter-frequency/README.md +++ b/exercises/parallel-letter-frequency/README.md @@ -7,6 +7,14 @@ sequentially. A common example is counting the frequency of letters. Create a function that returns the total frequency of each letter in a list of texts and that employs parallelism. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/pascals-triangle/README.md b/exercises/pascals-triangle/README.md index a102a4400f..eb7f7f0bde 100644 --- a/exercises/pascals-triangle/README.md +++ b/exercises/pascals-triangle/README.md @@ -14,6 +14,14 @@ the right and left of the current position in the previous row. # ... etc ``` +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/perfect-numbers/README.md b/exercises/perfect-numbers/README.md index bf2c396000..50e646ec57 100644 --- a/exercises/perfect-numbers/README.md +++ b/exercises/perfect-numbers/README.md @@ -17,6 +17,14 @@ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) d Implement a way to determine whether a given number is **perfect**. Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/phone-number/README.md b/exercises/phone-number/README.md index c5677ddba7..7836002f60 100644 --- a/exercises/phone-number/README.md +++ b/exercises/phone-number/README.md @@ -28,6 +28,14 @@ should all produce the output **Note:** As this exercise only deals with telephone numbers used in NANP-countries, only 1 is considered a valid country code. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/pig-latin/README.md b/exercises/pig-latin/README.md index f59f7227ca..e7c2a8f846 100644 --- a/exercises/pig-latin/README.md +++ b/exercises/pig-latin/README.md @@ -7,16 +7,24 @@ confusing. It obeys a few simple rules (below), but when it's spoken quickly it's really difficult for non-children (and non-native speakers) to understand. -- **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to - the end of the word. -- **Rule 2**: If a word begins with a consonant sound, move it to the - end of the word, and then add an "ay" sound to the end of the word. +- **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to the end of the word. Please note that "xr" and "yt" at the beginning of a word make vowel sounds (e.g. "xray" -> "xrayay", "yttria" -> "yttriaay"). +- **Rule 2**: If a word begins with a consonant sound, move it to the end of the word and then add an "ay" sound to the end of the word. Consonant sounds can be made up of multiple consonants, a.k.a. a consonant cluster (e.g. "chair" -> "airchay"). +- **Rule 3**: If a word starts with a consonant sound followed by "qu", move it to the end of the word, and then add an "ay" sound to the end of the word (e.g. "square" -> "aresquay"). +- **Rule 4**: If a word contains a "y" after a consonant cluster or as the second letter in a two letter word it makes a vowel sound (e.g. "rhythm" -> "ythmrhay", "my" -> "ymay"). There are a few more rules for edge cases, and there are regional variants too. See for more details. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/poker/README.md b/exercises/poker/README.md index ffd6eef3da..fad622f60b 100644 --- a/exercises/poker/README.md +++ b/exercises/poker/README.md @@ -5,6 +5,14 @@ Pick the best hand(s) from a list of poker hands. See [wikipedia](https://en.wikipedia.org/wiki/List_of_poker_hands) for an overview of poker hands. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/pov/README.md b/exercises/pov/README.md index acd2217578..87ef4f8150 100644 --- a/exercises/pov/README.md +++ b/exercises/pov/README.md @@ -37,6 +37,14 @@ a different leaf node) can be seen to follow the path 6-2-0-3-9 This exercise involves taking an input graph and re-orientating it from the point of view of one of the nodes. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/prime-factors/README.md b/exercises/prime-factors/README.md index b46f4715d4..c9d9e8de7e 100644 --- a/exercises/prime-factors/README.md +++ b/exercises/prime-factors/README.md @@ -29,6 +29,14 @@ You can check this yourself: - = 60 - Success! +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/protein-translation/README.md b/exercises/protein-translation/README.md index 091c1b0a61..5be0d502ee 100644 --- a/exercises/protein-translation/README.md +++ b/exercises/protein-translation/README.md @@ -41,6 +41,14 @@ UAA, UAG, UGA | STOP Learn more about [protein translation on Wikipedia](http://en.wikipedia.org/wiki/Translation_(biology)) +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/proverb/README.md b/exercises/proverb/README.md index 186eb77c43..471629c61e 100644 --- a/exercises/proverb/README.md +++ b/exercises/proverb/README.md @@ -20,6 +20,14 @@ Note that the list of inputs may vary; your solution should be able to handle li Try to capture the structure of the song in your code, where you build up the song by composing its parts. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/pythagorean-triplet/README.md b/exercises/pythagorean-triplet/README.md index 902e6b7640..7c7e5dd272 100644 --- a/exercises/pythagorean-triplet/README.md +++ b/exercises/pythagorean-triplet/README.md @@ -17,6 +17,14 @@ There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product a * b * c. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/queen-attack/README.md b/exercises/queen-attack/README.md index 65cfe65c51..495bd6777e 100644 --- a/exercises/queen-attack/README.md +++ b/exercises/queen-attack/README.md @@ -26,6 +26,14 @@ You'd also be able to answer whether the queens can attack each other. In this case, that answer would be yes, they can, because both pieces share a diagonal. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/rail-fence-cipher/README.md b/exercises/rail-fence-cipher/README.md index 0fbdf312c4..c319d4e113 100644 --- a/exercises/rail-fence-cipher/README.md +++ b/exercises/rail-fence-cipher/README.md @@ -58,6 +58,14 @@ W . . . E . . . C . . . R . . . L . . . T . . . E If you now read along the zig-zag shape you can read the original message. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/raindrops/README.md b/exercises/raindrops/README.md index 36a0aed6e4..7aae88c945 100644 --- a/exercises/raindrops/README.md +++ b/exercises/raindrops/README.md @@ -17,6 +17,14 @@ Convert a number to a string, the contents of which depend on the number's facto - 34 has four factors: 1, 2, 17, and 34. - In raindrop-speak, this would be "34". +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/rational-numbers/README.md b/exercises/rational-numbers/README.md index efcffbb530..bb75d691ca 100644 --- a/exercises/rational-numbers/README.md +++ b/exercises/rational-numbers/README.md @@ -1,3 +1,5 @@ +# Rational Numbers + A rational number is defined as the quotient of two integers `a` and `b`, called the numerator and denominator, respectively, where `b != 0`. The absolute value `|r|` of the rational number `r = a/b` is equal to `|a|/|b|`. @@ -24,4 +26,27 @@ Implement the following operations: Your implementation of rational numbers should always be reduced to lowest terms. For example, `4/4` should reduce to `1/1`, `30/60` should reduce to `1/2`, `12/8` should reduce to `3/2`, etc. To reduce a rational number `r = a/b`, divide `a` and `b` by the greatest common divisor (gcd) of `a` and `b`. So, for example, `gcd(12, 8) = 4`, so `r = 12/8` can be reduced to `(12/4)/(8/4) = 3/2`. -Assume that the programming language you are using does not have an implementation of rational numbers. \ No newline at end of file +Assume that the programming language you are using does not have an implementation of rational numbers. + +## Hints +This exercise requires you to write an extension method. For more information, see [this page](https://msdn.microsoft.com/en-us//library/bb383977.aspx). + +This exercise also requires you to write operator overloading methods for +, -, * and / operators. For more information, see [this page](https://msdn.microsoft.com/en-us/library/5tk49fh2.aspx). + + + +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). + +## Source + +Wikipedia [https://en.wikipedia.org/wiki/Rational_number](https://en.wikipedia.org/wiki/Rational_number) + +## Submitting Incomplete Solutions +It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/react/README.md b/exercises/react/README.md index 67f95eb818..34ebf7f05c 100644 --- a/exercises/react/README.md +++ b/exercises/react/README.md @@ -19,6 +19,14 @@ state has changed from the previous stable state. In this exercise the following C# feature is used: - [Events](https://msdn.microsoft.com/en-us/library/9aackb16(v=vs.110).aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/rectangles/README.md b/exercises/rectangles/README.md index 1133bd52de..f701fa30c8 100644 --- a/exercises/rectangles/README.md +++ b/exercises/rectangles/README.md @@ -63,6 +63,14 @@ The above diagram contains 6 rectangles: You may assume that the input is always a proper rectangle (i.e. the length of every line equals the length of the first line). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/reverse-string/README.md b/exercises/reverse-string/README.md index 72d31a463d..bb2f59f05a 100644 --- a/exercises/reverse-string/README.md +++ b/exercises/reverse-string/README.md @@ -6,6 +6,14 @@ For example: input: "cool" output: "looc" +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/rna-transcription/README.md b/exercises/rna-transcription/README.md index 8892650329..01c0f7d6b3 100644 --- a/exercises/rna-transcription/README.md +++ b/exercises/rna-transcription/README.md @@ -18,6 +18,14 @@ each nucleotide with its complement: * `T` -> `A` * `A` -> `U` +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/robot-name/README.md b/exercises/robot-name/README.md index 10f27d12da..4c4595c195 100644 --- a/exercises/robot-name/README.md +++ b/exercises/robot-name/README.md @@ -15,6 +15,14 @@ The names must be random: they should not follow a predictable sequence. Random names means a risk of collisions. Your solution must ensure that every existing robot has a unique name. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/robot-simulator/README.md b/exercises/robot-simulator/README.md index 1cc80657d2..a705bacb82 100644 --- a/exercises/robot-simulator/README.md +++ b/exercises/robot-simulator/README.md @@ -27,6 +27,14 @@ direction it is pointing. - Say a robot starts at {7, 3} facing north. Then running this stream of instructions should leave it at {9, 4} facing west. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/roman-numerals/README.md b/exercises/roman-numerals/README.md index 3228ad143f..ff2ca53db2 100644 --- a/exercises/roman-numerals/README.md +++ b/exercises/roman-numerals/README.md @@ -46,6 +46,14 @@ See also: http://www.novaroma.org/via_romana/numbers.html This exercise requires you to write an extension method. For more information, see [this page](https://msdn.microsoft.com/en-us//library/bb383977.aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/rotational-cipher/README.md b/exercises/rotational-cipher/README.md index 766ecf6ad7..85d893ca3b 100644 --- a/exercises/rotational-cipher/README.md +++ b/exercises/rotational-cipher/README.md @@ -30,6 +30,14 @@ Ciphertext is written out in the same formatting as the input including spaces a - ROT13 `The quick brown fox jumps over the lazy dog.` gives `Gur dhvpx oebja sbk whzcf bire gur ynml qbt.` - ROT13 `Gur dhvpx oebja sbk whzcf bire gur ynml qbt.` gives `The quick brown fox jumps over the lazy dog.` +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/run-length-encoding/README.md b/exercises/run-length-encoding/README.md index 0e9d4a5032..83f268fac1 100644 --- a/exercises/run-length-encoding/README.md +++ b/exercises/run-length-encoding/README.md @@ -23,6 +23,14 @@ the letters A through Z (either lower or upper case) and whitespace. This way data to be encoded will never contain any numbers and numbers inside data to be decoded always represent the count for the following character. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/saddle-points/README.md b/exercises/saddle-points/README.md index 39515ab3c4..1f6553afcd 100644 --- a/exercises/saddle-points/README.md +++ b/exercises/saddle-points/README.md @@ -31,6 +31,14 @@ but the tests for this exercise follow the above unambiguous definition. For this exercise, you will need to create a set of factors using tuples. For more information on tuples, see [this link](https://msdn.microsoft.com/en-us/library/system.tuple(v=vs.110).aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/say/README.md b/exercises/say/README.md index 0333ff89da..6e2a706a79 100644 --- a/exercises/say/README.md +++ b/exercises/say/README.md @@ -24,7 +24,7 @@ Some good test cases for this program are: ### Extension If you're on a Mac, shell out to Mac OS X's `say` program to talk out -loud. +loud. If you're on Linux or Windows, eSpeakNG may be available with the command `espeak`. ## Step 2 @@ -62,6 +62,14 @@ Use _and_ (correctly) when spelling out the number in English: - 1002 becomes "one thousand and two". - 1323 becomes "one thousand three hundred and twenty-three". +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/scale-generator/README.md b/exercises/scale-generator/README.md index aa96ed2f7f..dee4091494 100644 --- a/exercises/scale-generator/README.md +++ b/exercises/scale-generator/README.md @@ -4,13 +4,13 @@ Given a tonic, or starting note, and a set of intervals, generate the musical scale starting with the tonic and following the specified interval pattern. -Scales in Western music are based on the chromatic (12-note) scale.This +Scales in Western music are based on the chromatic (12-note) scale. This scale can be expressed as the following group of pitches: A, A#, B, C, C#, D, D#, E, F, F#, G, G# -A given sharp note (indicated by a #), can also be expressed as the flat -of the note above it (indicated by a b), so the chromatic scale can also be +A given sharp note (indicated by a #) can also be expressed as the flat +of the note above it (indicated by a b) so the chromatic scale can also be written like this: A, Bb, B, C, Db, D, Eb, E, F, Gb, G, Ab @@ -20,9 +20,9 @@ collection. They have seven pitches, and are called diatonic scales. The collection of notes in these scales is written with either sharps or flats, depending on the tonic. Here is a list of which are which: -No Accidentals: +No Sharps or Flats: C major -A minor +a minor Use Sharps: G, D, A, E, B, F# major @@ -43,18 +43,19 @@ a "whole step" or "major second" (written as an upper-case "M"). The diatonic scales are built using only these two intervals between adjacent notes. -Non-diatonic scales can contain the same letter twice, and can contain other intervals. -Sometimes they may be smaller than usual (diminished, written "D"), or larger -(augmented, written "A"). Intervals larger than an augmented second have other names. +Non-diatonic scales can contain other intervals. An "augmented first" +interval, written "A", has two interceding notes (e.g., from A to C or +Db to E). There are also smaller and larger intervals, but they will not +figure into this exercise. -Here is a table of pitches with the names of their interval distance from the tonic (A). +## Running the tests -| A | A# | B | C | C# | D | D# | E | F | F# | G | G# | A | -|:------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:------:| -| Unison | Min 2nd | Maj 2nd | Min 3rd | Maj 3rd | Per 4th | Tritone | Per 5th | Min 6th | Maj 6th | Min 7th | Maj 7th | Octave | -| | | Dim 3rd | Aug 2nd | Dim 4th | | Aug 4th | Dim 5th | Aug 5th | Dim 7th | Aug 6th | Dim 8ve | | -| | | | | | | Dim 5th | | | | | | | +To run the tests, run the command `dotnet test` from within the exercise directory. +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/scrabble-score/README.md b/exercises/scrabble-score/README.md index 6d4e771d82..0602980982 100644 --- a/exercises/scrabble-score/README.md +++ b/exercises/scrabble-score/README.md @@ -39,6 +39,14 @@ And to total: - You can play a double or a triple letter. - You can play a double or a triple word. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/secret-handshake/README.md b/exercises/secret-handshake/README.md index 3192c52d42..c9e721a102 100644 --- a/exercises/secret-handshake/README.md +++ b/exercises/secret-handshake/README.md @@ -28,6 +28,14 @@ Given the input 19, the function would return the array Notice that the addition of 16 (10000 in binary) has caused the array to be reversed. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/series/README.md b/exercises/series/README.md index 19d78432af..a4c2b819f7 100644 --- a/exercises/series/README.md +++ b/exercises/series/README.md @@ -1,18 +1,18 @@ # Series Given a string of digits, output all the contiguous substrings of length `n` in -that string. +that string in the order that they appear. For example, the string "49142" has the following 3-digit series: -- 491 -- 914 -- 142 +- "491" +- "914" +- "142" And the following 4-digit series: -- 4914 -- 9142 +- "4914" +- "9142" And if you ask for a 6-digit series from a 5-digit string, you deserve whatever you get. @@ -20,6 +20,14 @@ whatever you get. Note that these series are only required to occupy *adjacent positions* in the input; the digits need not be *numerically consecutive*. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/sgf-parsing/README.md b/exercises/sgf-parsing/README.md index f79a44a589..7c42d706c3 100644 --- a/exercises/sgf-parsing/README.md +++ b/exercises/sgf-parsing/README.md @@ -68,6 +68,14 @@ data types of properties, just use the rules for the - To parse the text, you could try to use the [Sprache](https://github.com/sprache/Sprache/blob/develop/README.md) library. You can also find a good tutorial [here](https://www.thomaslevesque.com/2017/02/23/easy-text-parsing-in-c-with-sprache/). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/sieve/README.md b/exercises/sieve/README.md index 3149278929..94272e59a5 100644 --- a/exercises/sieve/README.md +++ b/exercises/sieve/README.md @@ -5,8 +5,8 @@ number. The Sieve of Eratosthenes is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as -composite (i.e. not prime) the multiples of each prime, -starting with the multiples of 2. +composite (i.e. not prime) the multiples of each prime, starting with the +multiples of 2. It does not use any division or remainder operation. Create your range, starting at two and continuing up to and including the given limit. (i.e. [2, limit]) @@ -25,8 +25,18 @@ https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes Notice that this is a very specific algorithm, and the tests don't check that you've implemented the algorithm, only that you've come up with the -correct list of primes. +correct list of primes. A good first test is to check that you do not use +division or remainder operations (div, /, mod or % depending on the +language). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/simple-cipher/README.md b/exercises/simple-cipher/README.md index 9605876d89..65c9b27d16 100644 --- a/exercises/simple-cipher/README.md +++ b/exercises/simple-cipher/README.md @@ -81,6 +81,14 @@ on Wikipedia][dh] for one of the first implementations of this scheme. [1]: https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Caesar_cipher_left_shift_of_3.svg/320px-Caesar_cipher_left_shift_of_3.svg.png [dh]: http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/simple-linked-list/README.md b/exercises/simple-linked-list/README.md index 12f539796e..7ac516797a 100644 --- a/exercises/simple-linked-list/README.md +++ b/exercises/simple-linked-list/README.md @@ -25,6 +25,14 @@ implement your own abstract data type. This exercise requires you to create a linked list data structure which can be iterated. This requires you to implement the IEnumerable\ interface. For more information, see [this page](https://msdn.microsoft.com/en-us/library/9eekhta0(v=vs.110).aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/space-age/README.md b/exercises/space-age/README.md index 61c5b1bd28..86bbe54b32 100644 --- a/exercises/space-age/README.md +++ b/exercises/space-age/README.md @@ -17,6 +17,14 @@ be able to say that they're 31.69 Earth-years old. If you're wondering why Pluto didn't make the cut, go watch [this youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/spiral-matrix/README.md b/exercises/spiral-matrix/README.md index a5a0c82fea..7aee545024 100644 --- a/exercises/spiral-matrix/README.md +++ b/exercises/spiral-matrix/README.md @@ -23,6 +23,14 @@ like these examples: 10 9 8 7 ``` +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/strain/README.md b/exercises/strain/README.md index 06e2c5f026..1dd00aa433 100644 --- a/exercises/strain/README.md +++ b/exercises/strain/README.md @@ -33,6 +33,14 @@ Keep your hands off that filter/reject/whatchamacallit functionality provided by your standard library! Solve this one yourself using other basic tools instead. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/sublist/README.md b/exercises/sublist/README.md index a5746669ac..04871b2894 100644 --- a/exercises/sublist/README.md +++ b/exercises/sublist/README.md @@ -22,6 +22,14 @@ To be able to compare data, the IComparable interface is used. For more information, see [this page](https://msdn.microsoft.com/en-us/library/system.icomparable(v=vs.110).aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/sum-of-multiples/README.md b/exercises/sum-of-multiples/README.md index 8b761d2a59..edbeb1c61f 100644 --- a/exercises/sum-of-multiples/README.md +++ b/exercises/sum-of-multiples/README.md @@ -12,6 +12,14 @@ The sum of these multiples is 78. This exercise requires you to process a collection of data. You can simplify your code by using LINQ (Language Integrated Query). For more information, see [this page](https://docs.microsoft.com/en-us/dotnet/articles/standard/using-linq). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/tournament/README.md b/exercises/tournament/README.md index 0b1faf6aca..9bad595d1a 100644 --- a/exercises/tournament/README.md +++ b/exercises/tournament/README.md @@ -64,6 +64,14 @@ Devastating Donkeys;Courageous Californians;draw Means that the Devastating Donkeys and Courageous Californians tied. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/transpose/README.md b/exercises/transpose/README.md index b5d75f2808..97f742b636 100644 --- a/exercises/transpose/README.md +++ b/exercises/transpose/README.md @@ -58,6 +58,14 @@ In general, all characters from the input should also be present in the transpos That means that if a column in the input text contains only spaces on its bottom-most row(s), the corresponding output row should contain the spaces in its right-most column(s). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/tree-building/README.md b/exercises/tree-building/README.md index dd35c868e4..c1fa1c31b7 100644 --- a/exercises/tree-building/README.md +++ b/exercises/tree-building/README.md @@ -26,6 +26,14 @@ root (ID: 0, parent ID: 0) +-- child3 (ID: 5, parent ID: 0) ``` +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/triangle/README.md b/exercises/triangle/README.md index aea94fbbe5..81e087103e 100644 --- a/exercises/triangle/README.md +++ b/exercises/triangle/README.md @@ -22,6 +22,14 @@ The case where the sum of the lengths of two sides _equals_ that of the third is known as a _degenerate_ triangle - it has zero area and looks like a single line. Feel free to add your own code/tests to check for degenerate triangles. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/trinary/README.md b/exercises/trinary/README.md index 7869dca0b9..766746ca13 100644 --- a/exercises/trinary/README.md +++ b/exercises/trinary/README.md @@ -21,6 +21,14 @@ is the 3's place, the third to last is the 9's place, etc. If your language provides a method in the standard library to perform the conversion, pretend it doesn't exist and implement it yourself. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/twelve-days/README.md b/exercises/twelve-days/README.md index cc332f6c9d..a64d8218cc 100644 --- a/exercises/twelve-days/README.md +++ b/exercises/twelve-days/README.md @@ -4,16 +4,27 @@ Output the lyrics to 'The Twelve Days of Christmas'. ```text On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree. + On the second day of Christmas my true love gave to me, two Turtle Doves, and a Partridge in a Pear Tree. + On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. + On the fourth day of Christmas my true love gave to me, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. + On the fifth day of Christmas my true love gave to me, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. + On the sixth day of Christmas my true love gave to me, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. + On the seventh day of Christmas my true love gave to me, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. + On the eighth day of Christmas my true love gave to me, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. + On the ninth day of Christmas my true love gave to me, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. + On the tenth day of Christmas my true love gave to me, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. + On the eleventh day of Christmas my true love gave to me, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. + On the twelfth day of Christmas my true love gave to me, twelve Drummers Drumming, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree. ``` @@ -21,6 +32,14 @@ On the twelfth day of Christmas my true love gave to me, twelve Drummers Drummin - Try to capture the structure of the song in your code, where you build up the song by composing its parts. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/two-bucket/README.md b/exercises/two-bucket/README.md index cc5ffedafc..fbadaf4a41 100644 --- a/exercises/two-bucket/README.md +++ b/exercises/two-bucket/README.md @@ -27,8 +27,16 @@ To conclude, the only valid moves are: - emptying one bucket and doing nothing to the other - filling one bucket and doing nothing to the other -Written with <3 at [Fullstack Academy](http://www.fullstackacademy.com/) by [Lindsay](http://lindsaylevine.com). +Written with <3 at [Fullstack Academy](http://www.fullstackacademy.com/) by Lindsay Levine. +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/two-fer/README.md b/exercises/two-fer/README.md index f320586eea..513b822e88 100644 --- a/exercises/two-fer/README.md +++ b/exercises/two-fer/README.md @@ -12,6 +12,14 @@ If the given name is "Alice", the result should be "One for Alice, one for me." If no name is given, the result should be "One for you, one for me." +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/variable-length-quantity/README.md b/exercises/variable-length-quantity/README.md index 76e5a93f66..46ff9655d3 100644 --- a/exercises/variable-length-quantity/README.md +++ b/exercises/variable-length-quantity/README.md @@ -36,6 +36,14 @@ This exercise requires you to use bitwise operations. For more information, see (https://msdn.microsoft.com/en-us/library/6a71f45d.aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/word-count/README.md b/exercises/word-count/README.md index 8ca9819106..45bf04b50a 100644 --- a/exercises/word-count/README.md +++ b/exercises/word-count/README.md @@ -11,6 +11,14 @@ come: 1 free: 1 ``` +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/word-search/README.md b/exercises/word-search/README.md index 40578922a6..2bea144bba 100644 --- a/exercises/word-search/README.md +++ b/exercises/word-search/README.md @@ -33,6 +33,14 @@ a function that returns a Tuple (the x- and y- part of a coordinate). For more information on Tuples, see [this link](https://msdn.microsoft.com/en-us/library/system.tuple(v=vs.110).aspx). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/wordy/README.md b/exercises/wordy/README.md index e9017d6a52..fdb1113785 100644 --- a/exercises/wordy/README.md +++ b/exercises/wordy/README.md @@ -55,6 +55,14 @@ If you'd like, handle exponentials. - To parse the text, you could try to use the [Sprache](https://github.com/sprache/Sprache/blob/develop/README.md) library. You can also find a good tutorial [here](https://www.thomaslevesque.com/2017/02/23/easy-text-parsing-in-c-with-sprache/). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/yacht/README.md b/exercises/yacht/README.md index bc2323987c..4c3b3bfa75 100644 --- a/exercises/yacht/README.md +++ b/exercises/yacht/README.md @@ -1,4 +1,6 @@ -# Score a single throw of dice in *Yacht* +# Yacht + +# Score a single throw of dice in *Yacht* The dice game [Yacht](https://en.wikipedia.org/wiki/Yacht_(dice_game)) is from the same family as Poker Dice, Generala and particularly Yahtzee, of which it @@ -8,27 +10,44 @@ category chosen. ## Scores in Yacht - Category Score Example - Ones 1 × number of ones 1 1 1 4 5 scores 3 - Twos 2 × number of twos 2 2 3 4 5 scores 4 - Threes 3 × number of threes 3 3 3 3 3 scores 15 - Fours 4 × number of fours 1 2 3 3 5 scores 0 - Fives 5 × number of fives 5 1 5 2 5 scores 15 - Sixes 6 × number of sixes 2 3 4 5 6 scores 6 - Full House Total of the dice 3 3 3 5 5 scores 19 - Four of a Kind Total of the four dice 4 4 4 4 6 scores 16 - Little Straight 30 points 1 2 3 4 5 scores 30 - Big Straight 30 points 2 3 4 5 6 scores 30 - Choice Sum of the dice 2 3 3 4 6 scores 18 - Yacht 50 points 4 4 4 4 4 scores 50 +| Category | Score | Description | Example | +| -------- | ----- | ----------- | ------- | +| Ones | 1 × number of ones | Any combination | 1 1 1 4 5 scores 3 | +| Twos | 2 × number of twos | Any combination | 2 2 3 4 5 scores 4 | +| Threes | 3 × number of threes | Any combination | 3 3 3 3 3 scores 15 | +| Fours | 4 × number of fours | Any combination | 1 2 3 3 5 scores 0 | +| Fives | 5 × number of fives| Any combination | 5 1 5 2 5 scores 15 | +| Sixes | 6 × number of sixes | Any combination | 2 3 4 5 6 scores 6 | +| Full House | Total of the dice | Three of one number and two of another | 3 3 3 5 5 scores 19 | +| Four of a Kind | Total of the four dice | At least four dice showing the same face | 4 4 4 4 6 scores 16 | +| Little Straight | 30 points | 1-2-3-4-5 | 1 2 3 4 5 scores 30 | +| Big Straight | 30 points | 2-3-4-5-6 | 2 3 4 5 6 scores 30 | +| Choice | Sum of the dice | Any combination | 2 3 3 4 6 scores 18 | +| Yacht | 50 points | All five dice showing the same face | 4 4 4 4 4 scores 50 | If the dice do not satisfy the requirements of a category, the score is zero. If, for example, *Four Of A Kind* is entered in the *Yacht* category, zero points are scored. A *Yacht* scores zero if entered in the *Full House* category. -## Task +## Task Given a list of values for five dice and a category, your solution should return the score of the dice for that category. If the dice do not satisfy the requirements of the category your solution should return 0. You can assume that five values will always be presented, and the value of each will be between one and six inclusively. You should not assume that the dice are ordered. + +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). + +## Source + +James Kilfiger, using wikipedia [https://en.wikipedia.org/wiki/Yacht_(dice_game)](https://en.wikipedia.org/wiki/Yacht_(dice_game)) + +## Submitting Incomplete Solutions +It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/zebra-puzzle/README.md b/exercises/zebra-puzzle/README.md index 9df93953da..acd5193dd6 100644 --- a/exercises/zebra-puzzle/README.md +++ b/exercises/zebra-puzzle/README.md @@ -30,6 +30,14 @@ This exercise requires you to process a collection of data. You can simplify you For more information, see [this page](https://xosfaere.wordpress.com/2010/03/21/lazy-evaluation-in-csharp/). +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Source diff --git a/exercises/zipper/README.md b/exercises/zipper/README.md index 6ea362a999..47af2b295a 100644 --- a/exercises/zipper/README.md +++ b/exercises/zipper/README.md @@ -31,6 +31,14 @@ list of child nodes) a zipper might support these operations: This exercise deals with custom equality. For more information see [this page.](http://www.loganfranken.com/blog/687/overriding-equals-in-c-part-1/) +## Running the tests + +To run the tests, run the command `dotnet test` from within the exercise directory. + +## Further information + +For more detailed information about the C# track, including how to get help if +you're having trouble, please visit the exercism.io [C# language page](http://exercism.io/languages/csharp/resources). ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise. From 19f3a8159436f133c47206d6230db110fa1ce7d6 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Tue, 7 Aug 2018 08:25:59 +0200 Subject: [PATCH 2/2] Update PR with review comments --- docs/RESOURCES.md | 2 +- exercises/clock/.meta/hints.md | 4 ++-- exercises/clock/Clock.cs | 2 +- exercises/clock/README.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/RESOURCES.md b/docs/RESOURCES.md index a4b52c4d78..003a8a1eec 100644 --- a/docs/RESOURCES.md +++ b/docs/RESOURCES.md @@ -9,7 +9,7 @@ ### Social media -- [StackOverflow ](http://stackoverflow.com/questions/tagged/c%23) can be used to search for your problem and see if it has been answered already. You can also ask and answer questions. +- [StackOverflow](http://stackoverflow.com/questions/tagged/c%23) can be used to search for your problem and see if it has been answered already. You can also ask and answer questions. - [/r/csharp](https://www.reddit.com/r/csharp) is the C# subreddit. - [@dotnet](https://twitter.com/DotNet) is the official .NET Twitter account. - [Gitter](https://gitter.im/exercism/xcsharp) is the C# Gitter room, go here to get support and ask questions related to the C# track. diff --git a/exercises/clock/.meta/hints.md b/exercises/clock/.meta/hints.md index 40f3c930a9..1474b70dfb 100644 --- a/exercises/clock/.meta/hints.md +++ b/exercises/clock/.meta/hints.md @@ -1,4 +1,4 @@ ## Hints -This exercise requires you to implements a type-specific method for determining equality of instances. +This exercise requires you to implement a type-specific method for determining equality of instances. For more information, see [this page] -(https://docs.microsoft.com/en-us/dotnet/core/api/System.IEquatable-1) . +(https://docs.microsoft.com/en-us/dotnet/core/api/System.IEquatable-1). diff --git a/exercises/clock/Clock.cs b/exercises/clock/Clock.cs index e5dd1a2275..66a464161d 100644 --- a/exercises/clock/Clock.cs +++ b/exercises/clock/Clock.cs @@ -1,6 +1,6 @@ using System; -public struct Clock +public class Clock { public Clock(int hours, int minutes) { diff --git a/exercises/clock/README.md b/exercises/clock/README.md index 45cddafd7b..a4df56031c 100644 --- a/exercises/clock/README.md +++ b/exercises/clock/README.md @@ -7,7 +7,7 @@ You should be able to add and subtract minutes to it. Two clocks that represent the same time should be equal to each other. ## Hints -This exercise requires you to implements a type-specific method for determining equality of instances. +This exercise requires you to implement a type-specific method for determining equality of instances. For more information, see [this page] (https://docs.microsoft.com/en-us/dotnet/core/api/System.IEquatable-1) .