diff --git a/config/exercise_readme.go.tmpl b/config/exercise_readme.go.tmpl index 2b26f49428..5e1a85b62f 100644 --- a/config/exercise_readme.go.tmpl +++ b/config/exercise_readme.go.tmpl @@ -4,10 +4,10 @@ {{- with .Hints }} {{ . }} {{ end }} -{{- with .TrackInsert }} -{{ . }} -{{ end }} -{{- with .Spec.Credits -}} +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/{{ .Spec.Slug }}` directory. +{{ with .Spec.Credits }} ## Source {{ . }} diff --git a/docs/EXERCISE_README_INSERT.md b/docs/EXERCISE_README_INSERT.md deleted file mode 100644 index ad5c0dfbd1..0000000000 --- a/docs/EXERCISE_README_INSERT.md +++ /dev/null @@ -1,5 +0,0 @@ -### Submitting Exercises - -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. \ No newline at end of file diff --git a/exercises/accumulate/README.md b/exercises/accumulate/README.md index 3d1a1f540f..873a7241c6 100644 --- a/exercises/accumulate/README.md +++ b/exercises/accumulate/README.md @@ -25,17 +25,13 @@ Keep your hands off that collect/map/fmap/whatchamacallit functionality provided by your standard library! Solve this one yourself using other basic tools instead. -Lisp specific: it's perfectly fine to use `MAPCAR` or the equivalent, -as this is idiomatic Lisp, not a library function. - ## 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). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/accumulate` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Conversation with James Edward Gray II [https://twitter.com/jeg2](https://twitter.com/jeg2) diff --git a/exercises/acronym/README.md b/exercises/acronym/README.md index 279416222d..906d27ee7f 100644 --- a/exercises/acronym/README.md +++ b/exercises/acronym/README.md @@ -7,12 +7,10 @@ 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). - ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/acronym` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Julien Vanier [https://github.com/monkbroc](https://github.com/monkbroc) diff --git a/exercises/all-your-base/README.md b/exercises/all-your-base/README.md index 0d5377f44e..c5ae5e0bfb 100644 --- a/exercises/all-your-base/README.md +++ b/exercises/all-your-base/README.md @@ -6,6 +6,7 @@ Implement general base conversion. Given a number in base **a**, represented as a sequence of digits, convert it to base **b**. ## Note + - Try to implement the conversion yourself. Do not use something else to perform the conversion for you. @@ -28,14 +29,11 @@ The number 1120, *in base 3*, means: I think you got the idea! - *Yes. Those three numbers above are exactly the same. Congratulations!* ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/all-your-base` directory. ## 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 d9b2bc08d2..cac4ec70d1 100644 --- a/exercises/allergies/README.md +++ b/exercises/allergies/README.md @@ -29,15 +29,13 @@ allergens that score 256, 512, 1024, etc.). Your program should ignore those components of the score. For example, if the allergy 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). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/allergies` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Jumpstart Lab Warm-up [http://jumpstartlab.com](http://jumpstartlab.com) diff --git a/exercises/alphametics/README.md b/exercises/alphametics/README.md index a2de057756..2c1fc4fd4d 100644 --- a/exercises/alphametics/README.md +++ b/exercises/alphametics/README.md @@ -7,7 +7,7 @@ letters in words are replaced with numbers. For example `SEND + MORE = MONEY`: -``` +```text S E N D M O R E + ----------- @@ -16,7 +16,7 @@ M O N E Y Replacing these with valid numbers gives: -``` +```text 9 5 6 7 1 0 8 5 + ----------- @@ -40,9 +40,7 @@ Try to find a more sophisticated solution. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/alphametics` directory. ## 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 6b3a3c48a2..e7d81d7fd8 100644 --- a/exercises/anagram/README.md +++ b/exercises/anagram/README.md @@ -8,9 +8,8 @@ Given `"listen"` and a list of candidates like `"enlists" "google" ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/anagram` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Inspired by the Extreme Startup game [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup) diff --git a/exercises/armstrong-numbers/README.md b/exercises/armstrong-numbers/README.md index 344b65fb4e..b907884682 100644 --- a/exercises/armstrong-numbers/README.md +++ b/exercises/armstrong-numbers/README.md @@ -1,3 +1,5 @@ +# Armstrong Numbers + An [Armstrong number](https://en.wikipedia.org/wiki/Narcissistic_number) is a number that is the sum of its own digits each raised to the power of the number of digits. For example: @@ -7,4 +9,15 @@ For example: - 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. \ No newline at end of file +Write some code to determine whether a number is an Armstrong number. + +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/armstrong-numbers` directory. + +## Source + +Wikipedia [https://en.wikipedia.org/wiki/Narcissistic_number](https://en.wikipedia.org/wiki/Narcissistic_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/atbash-cipher/README.md b/exercises/atbash-cipher/README.md index 2aec4cfc5c..6b656221ff 100644 --- a/exercises/atbash-cipher/README.md +++ b/exercises/atbash-cipher/README.md @@ -9,7 +9,7 @@ letter, the second with the second-last, and so on. An Atbash cipher for the Latin alphabet would be as follows: -```plain +```text Plain: abcdefghijklmnopqrstuvwxyz Cipher: zyxwvutsrqponmlkjihgfedcba ``` @@ -23,15 +23,15 @@ being 5 letters, and punctuation is excluded. This is to make it harder to guess things based on word boundaries. ## Examples + - Encoding `test` gives `gvhg` - Decoding `gvhg` gives `test` - Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog` ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/atbash-cipher` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [http://en.wikipedia.org/wiki/Atbash](http://en.wikipedia.org/wiki/Atbash) diff --git a/exercises/bank-account/README.md b/exercises/bank-account/README.md index 2387245d4e..c670a2b55a 100644 --- a/exercises/bank-account/README.md +++ b/exercises/bank-account/README.md @@ -33,9 +33,7 @@ Note though that you then only store the numeric value of a currency. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/bank-account` directory. ## 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 dae9d2669f..f66b2010f9 100644 --- a/exercises/beer-song/README.md +++ b/exercises/beer-song/README.md @@ -1,10 +1,10 @@ # Beer Song -Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall. +Recite the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall. Note that not all verses are identical. -```plain +```text 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall. @@ -325,9 +325,8 @@ experiment make the code better? Worse? Did you learn anything from it? ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/beer-song` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Learn to Program by Chris Pine [http://pine.fm/LearnToProgram/?Chapter=06](http://pine.fm/LearnToProgram/?Chapter=06) diff --git a/exercises/binary-search-tree/README.md b/exercises/binary-search-tree/README.md index f132c64733..d1cdbe54c9 100644 --- a/exercises/binary-search-tree/README.md +++ b/exercises/binary-search-tree/README.md @@ -55,9 +55,8 @@ And if we then added 1, 5, and 7, it would look like this ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/binary-search-tree` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Josh Cheek [https://twitter.com/josh_cheek](https://twitter.com/josh_cheek) diff --git a/exercises/binary-search/README.md b/exercises/binary-search/README.md index dab760c6ca..6d0fe58d4c 100644 --- a/exercises/binary-search/README.md +++ b/exercises/binary-search/README.md @@ -36,9 +36,8 @@ A binary search is a dichotomic divide and conquer search algorithm. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/binary-search` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [http://en.wikipedia.org/wiki/Binary_search_algorithm](http://en.wikipedia.org/wiki/Binary_search_algorithm) diff --git a/exercises/binary/README.md b/exercises/binary/README.md index bdbc9169c2..dddf58e389 100644 --- a/exercises/binary/README.md +++ b/exercises/binary/README.md @@ -7,10 +7,12 @@ string, your program should produce a decimal output. The program should handle invalid inputs. ## Note + - Implement the conversion yourself. Do not use something else to perform the conversion for you. ## About Binary (Base-2) + Decimal is a base-10 system. A number 23 in base 10 notation can be understood @@ -30,9 +32,8 @@ So: `101 => 1*2^2 + 0*2^1 + 1*2^0 => 1*4 + 0*2 + 1*1 => 4 + 1 => 5 base 10`. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/binary` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source All of Computer Science [http://www.wolframalpha.com/input/?i=binary&a=*C.binary-_*MathWorld-](http://www.wolframalpha.com/input/?i=binary&a=*C.binary-_*MathWorld-) diff --git a/exercises/bob/README.md b/exercises/bob/README.md index d49a4029c8..8d9a6ce521 100644 --- a/exercises/bob/README.md +++ b/exercises/bob/README.md @@ -8,15 +8,15 @@ He answers 'Whoa, chill out!' if you yell at him. He answers 'Calm down, I know what I'm doing!' if you yell a question at him. -He says 'Fine. Be that way!' if you address him without actually saying anything. +He says 'Fine. Be that way!' if you address him without actually saying +anything. He answers 'Whatever.' to anything else. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/bob` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=06](http://pine.fm/LearnToProgram/?Chapter=06) diff --git a/exercises/book-store/README.md b/exercises/book-store/README.md index 3d435ef9fa..4b2b2134c3 100644 --- a/exercises/book-store/README.md +++ b/exercises/book-store/README.md @@ -3,20 +3,20 @@ To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts on multiple book purchases. -One copy of any of the five books costs $8. +One copy of any of the five books costs $8. If, however, you buy two different books, you get a 5% discount on those two books. -If you buy 3 different books, you get a 10% discount. +If you buy 3 different books, you get a 10% discount. If you buy 4 different books, you get a 20% discount. -If you buy all 5, you get a 25% discount. +If you buy all 5, you get a 25% discount. Note: that if you buy four books, of which 3 are different titles, you get a 10% discount on the 3 that -form part of a set, but the fourth book still costs $8. +form part of a set, but the fourth book still costs $8. Your mission is to write a piece of code to calculate the price of any conceivable shopping basket (containing only @@ -30,7 +30,7 @@ For example, how much does this basket of books cost? - 2 copies of the third book - 1 copy of the fourth book - 1 copy of the fifth book - + One way of grouping these 8 books is: - 1 group of 5 --> 25% discount (1st,2nd,3rd,4th,5th) @@ -69,9 +69,8 @@ And $51.20 is the price with the biggest discount. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/book-store` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Inspired by the harry potter kata from Cyber-Dojo. [http://cyber-dojo.org](http://cyber-dojo.org) diff --git a/exercises/bowling/README.md b/exercises/bowling/README.md index 2649c7fa85..4e1d6010fe 100644 --- a/exercises/bowling/README.md +++ b/exercises/bowling/README.md @@ -2,19 +2,29 @@ Score a bowling game. -Bowling is game where players roll a heavy ball to knock down pins +Bowling is a game where players roll a heavy ball to knock down pins arranged in a triangle. Write code to keep track of the score of a game of bowling. ## Scoring Bowling -The game consists of 10 frames. A frame is composed of one or two ball throws with 10 pins standing at frame initialization. There are three cases for the tabulation of a frame. +The game consists of 10 frames. A frame is composed of one or two ball +throws with 10 pins standing at frame initialization. There are three +cases for the tabulation of a frame. -* An open frame is where a score of less than 10 is recorded for the frame. In this case the score for the frame is the number of pins knocked down. +* An open frame is where a score of less than 10 is recorded for the + frame. In this case the score for the frame is the number of pins + knocked down. -* A spare is where all ten pins are knocked down after the second throw. The total value of a spare is 10 plus the number of pins knocked down in their next throw. +* A spare is where all ten pins are knocked down by the second + throw. The total value of a spare is 10 plus the number of pins + knocked down in their next throw. -* A strike is where all ten pins are knocked down after the first throw. The total value of a strike is 10 plus the number of pins knocked down in their next two throws. If a strike is immediately followed by a second strike, then we can not total the value of first strike until they throw the ball one more time. +* A strike is where all ten pins are knocked down by the first + throw. The total value of a strike is 10 plus the number of pins + knocked down in the next two throws. If a strike is immediately + followed by a second strike, then the value of the first strike + cannot be determined until the ball is thrown one more time. Here is a three frame example: @@ -30,7 +40,11 @@ Frame 3 is (9 + 0) = 9 This means the current running total is 48. -The tenth frame in the game is a special case. If someone throws a strike or a spare then they get a fill ball. Fill balls exist to calculate the total of the 10th frame. Scoring a strike or spare on the fill ball does not give the player more fill balls. The total value of the 10th frame is the total number of pins knocked down. +The tenth frame in the game is a special case. If someone throws a +strike or a spare then they get a fill ball. Fill balls exist to +calculate the total of the 10th frame. Scoring a strike or spare on +the fill ball does not give the player more fill balls. The total +value of the 10th frame is the total number of pins knocked down. For a tenth frame of X1/ (strike and a spare), the total value is 20. @@ -48,9 +62,8 @@ support two operations: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/bowling` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source The Bowling Game Kata at but UncleBob [http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata](http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata) diff --git a/exercises/bracket-push/README.md b/exercises/bracket-push/README.md index 88de908ad9..814f182a41 100644 --- a/exercises/bracket-push/README.md +++ b/exercises/bracket-push/README.md @@ -5,9 +5,8 @@ verify that all the pairs are matched and nested correctly. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/bracket-push` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Ginna Baker diff --git a/exercises/change/README.md b/exercises/change/README.md index 5e86d8bee6..690dd2cc4b 100644 --- a/exercises/change/README.md +++ b/exercises/change/README.md @@ -18,12 +18,11 @@ that the sum of the coins' value would equal the correct amount of change. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/change` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source -Software Craftsmanship - Kata-logue [http://craftsmanship.sv.cmu.edu/exercises/coin-change-kata](https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata) +Software Craftsmanship - Coin Change Kata [https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata](https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata) ## 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/circular-buffer/README.md b/exercises/circular-buffer/README.md index 2f639d2deb..6ec0f78ead 100644 --- a/exercises/circular-buffer/README.md +++ b/exercises/circular-buffer/README.md @@ -31,23 +31,29 @@ If the buffer has 7 elements then it is completely full: When the buffer is full an error will be raised, alerting the client that further writes are blocked until a slot becomes free. -The client can opt to overwrite the oldest data with a forced write. In -this case, two more elements — A & B — are added and they overwrite the -3 & 4: +When the buffer is full, the client can opt to overwrite the oldest +data with a forced write. In this case, two more elements — A & B — +are added and they overwrite the 3 & 4: [6][7][8][9][A][B][5] -Finally, if two elements are now removed then what would be returned is -not 3 & 4 but 5 & 6 because A & B overwrote the 3 & the 4 yielding the -buffer with: +3 & 4 have been replaced by A & B making 5 now the oldest data in the +buffer. Finally, if two elements are removed then what would be +returned is 5 & 6 yielding the buffer: [ ][7][8][9][A][B][ ] +Because there is space available, if the client again uses overwrite +to store C & D then the space where 5 & 6 were stored previously will +be used not the location of 7 & 8. 7 is still the oldest element and +the buffer is once again full. + + [D][7][8][9][A][B][C] + ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/circular-buffer` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [http://en.wikipedia.org/wiki/Circular_buffer](http://en.wikipedia.org/wiki/Circular_buffer) diff --git a/exercises/clock/README.md b/exercises/clock/README.md index c4ea6f028f..4a9f614a9b 100644 --- a/exercises/clock/README.md +++ b/exercises/clock/README.md @@ -14,9 +14,8 @@ For more information, see [this page] ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/clock` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Pairing session with Erin Drummond [https://twitter.com/ebdrummond](https://twitter.com/ebdrummond) diff --git a/exercises/collatz-conjecture/README.md b/exercises/collatz-conjecture/README.md index a312510acc..0a5aede047 100644 --- a/exercises/collatz-conjecture/README.md +++ b/exercises/collatz-conjecture/README.md @@ -10,6 +10,7 @@ always reach 1 eventually. Given a number n, return the number of steps required to reach 1. ## Examples + Starting with n = 12, the steps would be as follows: 0. 12 @@ -27,12 +28,11 @@ Resulting in 9 steps. So for input n = 12, the return value would be 9. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/collatz-conjecture` directory. ## Source + An unsolved problem in mathematics named after mathematician Lothar Collatz [https://en.wikipedia.org/wiki/3x_%2B_1_problem](https://en.wikipedia.org/wiki/3x_%2B_1_problem) ## Submitting Incomplete Solutions -It's possible to submit an incomplete solution so you can see how others have completed the exercise. \ No newline at end of file +It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/complex-numbers/README.md b/exercises/complex-numbers/README.md index 8e7e6e5101..6b7d96b0a9 100644 --- a/exercises/complex-numbers/README.md +++ b/exercises/complex-numbers/README.md @@ -33,9 +33,8 @@ Assume the programming language you are using does not have an implementation of ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/complex-numbers` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [https://en.wikipedia.org/wiki/Complex_number](https://en.wikipedia.org/wiki/Complex_number) diff --git a/exercises/connect/README.md b/exercises/connect/README.md index 2e9cbe78da..b6f45f2aaf 100644 --- a/exercises/connect/README.md +++ b/exercises/connect/README.md @@ -18,7 +18,7 @@ computes the winner (or lack thereof). Note that all games need not be "fair". The boards look like this (with spaces added for readability, which won't be in the representation passed to your code): -``` +```text . O . X . . X X O . O O O X . @@ -32,9 +32,7 @@ won since `O` didn't connect top and bottom. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/connect` directory. ## 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 efa38dac89..e21fc4dfd1 100644 --- a/exercises/crypto-square/README.md +++ b/exercises/crypto-square/README.md @@ -26,7 +26,7 @@ and `r` is the number of rows. Our normalized text is 54 characters long, dictating a rectangle with `c = 8` and `r = 7`: -```plain +```text ifmanwas meanttos tayonthe @@ -41,22 +41,24 @@ right. The message above is coded as: -```plain +```text imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau ``` -Output the encoded text in chunks. Phrases that fill perfect squares -`(r X r)` should be output in `r`-length chunks separated by spaces. -Imperfect squares will have `n` empty spaces. Those spaces should be distributed evenly across the last `n` rows. +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. -```plain -imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau +```text +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: -```plain +```text imtgdvs fearwer mayoogo @@ -69,9 +71,8 @@ sseoau ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/crypto-square` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source J Dalbey's Programming Practice problems [http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html](http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html) diff --git a/exercises/custom-set/README.md b/exercises/custom-set/README.md index 1fa9befe6a..ead1577fa0 100644 --- a/exercises/custom-set/README.md +++ b/exercises/custom-set/README.md @@ -15,9 +15,7 @@ For more information, see [this page] ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/custom-set` directory. ## 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 951a31b35d..dafcf0a8db 100644 --- a/exercises/diamond/README.md +++ b/exercises/diamond/README.md @@ -1,7 +1,7 @@ # Diamond -The diamond kata takes as its input a letter, and outputs it in a diamond -shape. Given a letter, it prints a diamond starting with 'A', with the +The diamond kata takes as its input a letter, and outputs it in a diamond +shape. Given a letter, it prints a diamond starting with 'A', with the supplied letter at the widest point. ## Requirements @@ -15,7 +15,7 @@ supplied letter at the widest point. * The diamond has a square shape (width equals height). * The letters form a diamond shape. * The top half has the letters in ascending order. -* The bottom half has the letters in descending order. +* The bottom half has the letters in descending order. * The four corners (containing the spaces) are triangles. ## Examples @@ -24,13 +24,13 @@ In the following examples, spaces are indicated by `·` characters. Diamond for letter 'A': -```plain +```text A ``` Diamond for letter 'C': -```plain +```text ··A·· ·B·B· C···C @@ -40,7 +40,7 @@ C···C Diamond for letter 'E': -```plain +```text ····A···· ···B·B··· ··C···C·· @@ -60,13 +60,14 @@ The tests in this exercise are different from your usual tests. Normally, a test For this exercise, the tests all verify a property of the diamond shape your code should be producing. Furthermore, all tests check if the property they test holds for all valid input letters ('A' to 'Z'). -For more information on property-based testing, see [this article](http://www.erikschierboom.com/2016/02/22/property-based-testing/). +In order to facilitate propery-based testing, the tests in this exercise leverage the [FsCheck](https://www.nuget.org/packages/FsCheck) and [FsCheck.Xunit](https://packages.nuget.org/packages/FsCheck.Xunit/2.2.0) packages. To learn more about FsCheck, the documentation on the framework can be found [here](https://fscheck.github.io/FsCheck/). + +If you would like more information on property-based testing, see [this article](http://www.erikschierboom.com/2016/02/22/property-based-testing/). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/diamond` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Seb Rose [http://claysnow.co.uk/recycling-tests-in-tdd/](http://claysnow.co.uk/recycling-tests-in-tdd/) diff --git a/exercises/difference-of-squares/README.md b/exercises/difference-of-squares/README.md index efc13789b4..fc21027300 100644 --- a/exercises/difference-of-squares/README.md +++ b/exercises/difference-of-squares/README.md @@ -19,9 +19,8 @@ For more information, see [this page] ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/difference-of-squares` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Problem 6 at Project Euler [http://projecteuler.net/problem=6](http://projecteuler.net/problem=6) diff --git a/exercises/diffie-hellman/README.md b/exercises/diffie-hellman/README.md index 9f59cea9e5..31ba37fe7c 100644 --- a/exercises/diffie-hellman/README.md +++ b/exercises/diffie-hellman/README.md @@ -44,9 +44,8 @@ This exercise requires you to perform calculations on large numbers. To correctl ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/diffie-hellman` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia, 1024 bit key from www.cryptopp.com/wiki. [http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange](http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) diff --git a/exercises/dominoes/README.md b/exercises/dominoes/README.md index 2496b59f10..7faf09fc44 100644 --- a/exercises/dominoes/README.md +++ b/exercises/dominoes/README.md @@ -1,15 +1,22 @@ # Dominoes -Compute whether there exists a way to order a given set of dominoes in such a way that they form a +Make a chain of dominoes. + +Compute a way to order a given set of dominoes in such a way that they form a correct domino chain (the dots on one half of a stone match the dots on the neighbouring half of an adjacent stone) and that dots on the halfs of the stones which don't have a neighbour (the first and last stone) match each other. -For example given the stones `21`, `23` and `13` you should declare that there exists a possible chain (for example, `12`, `23` and `31` is a possible chain). +For example given the stones `[2|1]`, `[2|3]` and `[1|3]` you should compute something +like `[1|2] [2|3] [3|1]` or `[3|2] [2|1] [1|3]` or `[1|3] [3|2] [2|1]` etc, where the first and last numbers are the same. -For stones 12, 41 and 23 the resulting chain is not valid: 41 12 23's first and last numbers are not the same. 4 != 3 +For stones `[1|2]`, `[4|1]` and `[2|3]` the resulting chain is not valid: `[4|1] [1|2] [2|3]`'s first and last numbers are not the same. 4 != 3 Some test cases may use duplicate stones in a chain solution, assume that multiple Domino sets are being used. +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/dominoes` directory. + ## 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 853eadcf3f..0ae29216a3 100644 --- a/exercises/dot-dsl/README.md +++ b/exercises/dot-dsl/README.md @@ -1,4 +1,4 @@ -# Dot Dsl +# DOT DSL Write a Domain Specific Language similar to the Graphviz dot language. @@ -29,9 +29,7 @@ This exercise requires you to implement classes with a custom equality check. Fo ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/dot-dsl` directory. ## 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 9ed735a5ea..fe7bcae658 100644 --- a/exercises/error-handling/README.md +++ b/exercises/error-handling/README.md @@ -11,9 +11,7 @@ for your track to see what's exactly required. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/error-handling` directory. ## 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 f7d57a83d9..216b15ec13 100644 --- a/exercises/etl/README.md +++ b/exercises/etl/README.md @@ -1,8 +1,9 @@ -# Etl +# ETL We are going to do the `Transform` step of an Extract-Transform-Load. ### ETL + Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so we're going to migrate this." @@ -11,6 +12,7 @@ once." That's then typically followed by much forehead slapping and moaning about how stupid we could possibly be.) ### The goal + We're going to extract some scrabble scores from a legacy system. The old system stored a list of letters per score: @@ -46,9 +48,8 @@ game while being scored at 4 in the Hawaiian-language version. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/etl` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source The Jumpstart Lab team [http://jumpstartlab.com](http://jumpstartlab.com) diff --git a/exercises/flatten-array/README.md b/exercises/flatten-array/README.md index 9fc36fcc70..6b18b966d0 100644 --- a/exercises/flatten-array/README.md +++ b/exercises/flatten-array/README.md @@ -3,19 +3,17 @@ Take a nested list and return a single flattened list with all values except nil/null. The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values. - + For Example input: [1,[2,3,null,4],[null],5] output: [1,2,3,4,5] - ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/flatten-array` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Interview Question [https://reference.wolfram.com/language/ref/Flatten.html](https://reference.wolfram.com/language/ref/Flatten.html) diff --git a/exercises/food-chain/README.md b/exercises/food-chain/README.md index 8a5c668d30..db4a96dbba 100644 --- a/exercises/food-chain/README.md +++ b/exercises/food-chain/README.md @@ -10,7 +10,7 @@ This is a [cumulative song](http://en.wikipedia.org/wiki/Cumulative_song) of unk This is one of many common variants. -```plain +```text I know an old lady who swallowed a fly. I don't know why she swallowed the fly. Perhaps she'll die. @@ -69,9 +69,8 @@ She's dead, of course! ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/food-chain` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [http://en.wikipedia.org/wiki/There_Was_an_Old_Lady_Who_Swallowed_a_Fly](http://en.wikipedia.org/wiki/There_Was_an_Old_Lady_Who_Swallowed_a_Fly) diff --git a/exercises/forth/README.md b/exercises/forth/README.md index e679c2bd07..9c2057dc0f 100644 --- a/exercises/forth/README.md +++ b/exercises/forth/README.md @@ -31,9 +31,7 @@ Words are case-insensitive. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/forth` directory. ## 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 95043e114f..ff535402c5 100644 --- a/exercises/gigasecond/README.md +++ b/exercises/gigasecond/README.md @@ -6,9 +6,8 @@ A gigasecond is 10^9 (1,000,000,000) seconds. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/gigasecond` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Chapter 9 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=09](http://pine.fm/LearnToProgram/?Chapter=09) diff --git a/exercises/go-counting/README.md b/exercises/go-counting/README.md index 55455f80ea..18de4e4a79 100644 --- a/exercises/go-counting/README.md +++ b/exercises/go-counting/README.md @@ -16,7 +16,7 @@ only horizontal and vertical neighbours count. In the following diagram the stones which matter are marked "O" and the stones that don't are marked "I" (ignored). Empty spaces represent empty intersections. -``` +```text +----+ |IOOI| |O O| @@ -35,9 +35,7 @@ Library](http://senseis.xmp.net/). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/go-counting` directory. ## 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 ed00815937..262bb727c1 100644 --- a/exercises/grade-school/README.md +++ b/exercises/grade-school/README.md @@ -21,7 +21,6 @@ In the end, you should be able to: Note that all our students only have one name. (It's a small town, what do you want?) - ## For bonus points Did you get the tests passing and the code clean? If you want to, these @@ -37,9 +36,8 @@ experiment make the code better? Worse? Did you learn anything from it? ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/grade-school` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source A pairing session with Phil Battos at gSchool [http://gschool.it](http://gschool.it) diff --git a/exercises/grains/README.md b/exercises/grains/README.md index 82eac0d6c3..dbf88f934d 100644 --- a/exercises/grains/README.md +++ b/exercises/grains/README.md @@ -15,7 +15,6 @@ Write code that shows: - how many grains were on each square, and - the total number of grains - ## For bonus points Did you get the tests passing and the code clean? If you want to, these @@ -29,9 +28,8 @@ experiment make the code better? Worse? Did you learn anything from it? ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/grains` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source JavaRanch Cattle Drive, exercise 6 [http://www.javaranch.com/grains.jsp](http://www.javaranch.com/grains.jsp) diff --git a/exercises/grep/README.md b/exercises/grep/README.md index be8532e60d..544c3beeb3 100644 --- a/exercises/grep/README.md +++ b/exercises/grep/README.md @@ -3,14 +3,14 @@ Search a file for lines matching a regular expression pattern. Return the line number and contents of each matching line. -The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files +The Unix [`grep`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html) command can be used to search for lines in one or more files that match a user-provided search query (known as the *pattern*). The `grep` command takes three arguments: -1. The pattern used to match lines in a file. +1. The pattern used to match lines in a file. 2. Zero or more flags to customize the matching behavior. -3. One or more files in which to search for matching lines. +3. One or more files in which to search for matching lines. Your task is to implement the `grep` function, which should read the contents of the specified files, find the lines that match the specified pattern @@ -20,18 +20,18 @@ in the first file being output first. As an example, suppose there is a file named "input.txt" with the following contents: -
+```text
 hello
 world
 hello again
-
+``` If we were to call `grep "hello" input.txt`, the returned string should be: -
+```text
 hello
 hello again
-
+``` ### Flags @@ -46,18 +46,18 @@ As said earlier, the `grep` command should also support the following flags: If we run `grep -n "hello" input.txt`, the `-n` flag will require the matching lines to be prefixed with its line number: -
+```text
 1:hello
 3:hello again
-
+``` -And if we run `grep -i "HELLO" input.txt`, we'll do a case-insensitive match, +And if we run `grep -i "HELLO" input.txt`, we'll do a case-insensitive match, and the output will be: -
+```text
 hello
 hello again
-
+``` The `grep` command should support multiple flags at once. @@ -66,9 +66,8 @@ print the names of files that do not contain the string "hello". ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/grep` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Conversation with Nate Foster. [http://www.cs.cornell.edu/Courses/cs3110/2014sp/hw/0/ps0.pdf](http://www.cs.cornell.edu/Courses/cs3110/2014sp/hw/0/ps0.pdf) diff --git a/exercises/hamming/README.md b/exercises/hamming/README.md index 883e3af1bf..4a21a5379f 100644 --- a/exercises/hamming/README.md +++ b/exercises/hamming/README.md @@ -37,9 +37,8 @@ of equal length differently. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/hamming` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source The Calculating Point Mutations problem at Rosalind [http://rosalind.info/problems/hamm/](http://rosalind.info/problems/hamm/) diff --git a/exercises/hangman/README.md b/exercises/hangman/README.md index feddbba1e9..8896bb821a 100644 --- a/exercises/hangman/README.md +++ b/exercises/hangman/README.md @@ -24,9 +24,7 @@ This exercise requires you to work with events. For more information, see [this ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/hangman` directory. ## 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 fa7d728c6c..07190989df 100644 --- a/exercises/hello-world/README.md +++ b/exercises/hello-world/README.md @@ -16,9 +16,8 @@ If everything goes well, you will be ready to fetch your first real exercise. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/hello-world` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source This is an exercise to introduce users to using Exercism [http://en.wikipedia.org/wiki/%22Hello,_world!%22_program](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) diff --git a/exercises/hexadecimal/README.md b/exercises/hexadecimal/README.md index 98e239789f..3c289bafdc 100644 --- a/exercises/hexadecimal/README.md +++ b/exercises/hexadecimal/README.md @@ -9,9 +9,8 @@ The program should handle invalid hexadecimal strings. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/hexadecimal` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source All of Computer Science [http://www.wolframalpha.com/examples/NumberBases.html](http://www.wolframalpha.com/examples/NumberBases.html) diff --git a/exercises/house/README.md b/exercises/house/README.md index 1eb05480ed..404c6e29ca 100644 --- a/exercises/house/README.md +++ b/exercises/house/README.md @@ -1,6 +1,6 @@ # House -Output the nursery rhyme 'This is the House that Jack Built'. +Recite the nursery rhyme 'This is the House that Jack Built'. > [The] process of placing a phrase of clause within another phrase of > clause is called embedding. It is through the processes of recursion @@ -11,10 +11,9 @@ Output the nursery rhyme 'This is the House that Jack Built'. - [papyr.com](http://papyr.com/hypertextbooks/grammar/ph_noun.htm) - The nursery rhyme reads as follows: -```plain +```text This is the house that Jack built. This is the malt @@ -112,9 +111,8 @@ Try to capture the structure of the song in your code, where you build up the so ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/house` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source British nursery rhyme [http://en.wikipedia.org/wiki/This_Is_The_House_That_Jack_Built](http://en.wikipedia.org/wiki/This_Is_The_House_That_Jack_Built) diff --git a/exercises/isbn-verifier/README.md b/exercises/isbn-verifier/README.md index de7c5bbf7f..f6470323e9 100644 --- a/exercises/isbn-verifier/README.md +++ b/exercises/isbn-verifier/README.md @@ -1,40 +1,52 @@ -# ISBN Verifier +# ISBN Verifier -Check if a given ISBN-10 is valid. +The [ISBN-10 verification process](https://en.wikipedia.org/wiki/International_Standard_Book_Number) is used to validate book identification +numbers. These normally contain dashes and look like: `3-598-21508-8` -## Functionality +## ISBN + +The ISBN-10 format is 9 digits (0 to 9) plus one check character (either a digit or an X only). In the case the check character is an X, this represents the value '10'. These may be communicated with or without hyphens, and can be checked for their validity by the following formula: + +``` +(x1 * 10 + x2 * 9 + x3 * 8 + x4 * 7 + x5 * 6 + x6 * 5 + x7 * 4 + x8 * 3 + x9 * 2 + x10 * 1) mod 11 == 0 +``` + +If the result is 0, then it is a valid ISBN-10, otherwise it is invalid. + +## Example + +Let's take the ISBN-10 `3-598-21508-8`. We plug it in to the formula, and get: +``` +(3 * 10 + 5 * 9 + 9 * 8 + 8 * 7 + 2 * 6 + 1 * 5 + 5 * 4 + 0 * 3 + 8 * 2 + 8 * 1) mod 11 == 0 +``` -Given an unknown string the program should check if the provided string is a valid ISBN-10. +Since the result is 0, this proves that our ISBN is valid. + +## Task + +Given a string the program should check if the provided string is a valid ISBN-10. Putting this into place requires some thinking about preprocessing/parsing of the string prior to calculating the check digit for the ISBN. -The program should allow for ISBN-10 without the separating dashes to be verified as well. +The program should be able to verify ISBN-10 both with and without separating dashes. -## ISBN -Let's take a random ISBN-10 number, say `3-598-21508-8` for this. -The first digit block indicates the group where the ISBN belongs. Groups can consist of shared languages, geographic regions or countries. The leading '3' signals this ISBN is from a german speaking country. -The following number block is to identify the publisher. Since this is a three digit publisher number there is a 5 digit title number for this book. -The last digit in the ISBN is the check digit which is used to detect read errors. +## Caveats -The first 9 digits in the ISBN have to be between 0 and 9. -The check digit can additionally be an 'X' to allow 10 to be a valid check digit as well. +Converting from strings to numbers can be tricky in certain languages. +Now, it's even trickier since the check digit of an ISBN-10 may be 'X' (representing '10'). For instance `3-598-21507-X` is a valid ISBN-10. -A valid ISBN-10 is calculated with this formula `(x1 * 10 + x2 * 9 + x3 * 8 + x4 * 7 + x5 * 6 + x6 * 5 + x7 * 4 + x8 * 3 + x9 * 2 + x10 * 1) mod 11 == 0` -So for our example ISBN this means: -(3 * 10 + 5 * 9 + 9 * 8 + 8 * 7 + 2 * 6 + 1 * 5 + 5 * 4 + 0 * 3 + 8 * 2 + 8 * 1) mod 11 = 0 +## Bonus tasks -Which proves that the ISBN is valid. +* 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. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/isbn-verifier` directory. ## Source -Wikipedia [https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digit_calculation](https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digit_calculation) +Converting a string into a number and some basic processing utilizing a relatable real world example. [https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digit_calculation](https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digit_calculation) ## Submitting Incomplete Solutions - -It's possible to submit an incomplete solution so you can see how others have completed the exercise. \ No newline at end of file +It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/exercises/isogram/README.md b/exercises/isogram/README.md index 49c34eae8e..2a67ef4c71 100644 --- a/exercises/isogram/README.md +++ b/exercises/isogram/README.md @@ -2,21 +2,21 @@ Determine if a word or phrase is an isogram. -An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter. +An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times. Examples of isograms: - lumberjacks - background - downstream +- six-year-old The word *isograms*, however, is not an isogram, because the s repeats. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/isogram` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [https://en.wikipedia.org/wiki/Isogram](https://en.wikipedia.org/wiki/Isogram) diff --git a/exercises/kindergarten-garden/README.md b/exercises/kindergarten-garden/README.md index 98b0452c46..4f2bfc5311 100644 --- a/exercises/kindergarten-garden/README.md +++ b/exercises/kindergarten-garden/README.md @@ -3,19 +3,19 @@ Given a diagram, determine which plants each child in the kindergarten class is responsible for. -The kindergarten class is learning about growing plants. The teachers +The kindergarten class is learning about growing plants. The teacher thought it would be a good idea to give them actual seeds, plant them in actual dirt, and grow actual plants. They've chosen to grow grass, clover, radishes, and violets. -To this end, they've put little styrofoam cups along the window sills, -and planted one type of plant in each cup, choosing randomly from the -available types of seeds. +To this end, the children have put little cups along the window sills, and +planted one type of plant in each cup, choosing randomly from the available +types of seeds. -```plain +```text [window][window][window] -........................ # each dot represents a styrofoam cup +........................ # each dot represents a cup ........................ ``` @@ -25,27 +25,27 @@ There are 12 children in the class: - Eve, Fred, Ginny, Harriet, - Ileana, Joseph, Kincaid, and Larry. -Each child gets 4 cups, two on each row. The children are assigned to -cups in alphabetical order. +Each child gets 4 cups, two on each row. Their teacher assigns cups to +the children alphabetically by their names. The following diagram represents Alice's plants: -```plain +```text [window][window][window] VR...................... RG...................... ``` -So in the row nearest the window, she has a violet and a radish; in the -row behind that, she has a radish and some grass. +In the first row, nearest the windows, she has a violet and a radish. In the +second row she has a radish and some grass. Your program will be given the plants from left-to-right starting with the row nearest the windows. From this, it should be able to determine -which plants belong to which students. +which plants belong to each student. For example, if it's told that the garden looks like so: -```plain +```text [window][window][window] VRCGVVRVCGGCCGVRGCVCGCGV VRCCCGCRRGVCGCRVVCVGCGCV @@ -61,9 +61,8 @@ While asking for Bob's plants would yield: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/kindergarten-garden` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Random musings during airplane trip. [http://jumpstartlab.com](http://jumpstartlab.com) diff --git a/exercises/largest-series-product/README.md b/exercises/largest-series-product/README.md index 59ff369de7..75f59d79ad 100644 --- a/exercises/largest-series-product/README.md +++ b/exercises/largest-series-product/README.md @@ -15,9 +15,8 @@ the largest product for a series of 6 digits is 23520. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/largest-series-product` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source A variation on Problem 8 at Project Euler [http://projecteuler.net/problem=8](http://projecteuler.net/problem=8) diff --git a/exercises/leap/README.md b/exercises/leap/README.md index 772dabbf10..775fee75bb 100644 --- a/exercises/leap/README.md +++ b/exercises/leap/README.md @@ -4,7 +4,7 @@ Given a year, report if it is a leap year. The tricky thing here is that a leap year in the Gregorian calendar occurs: -```plain +```text on every year that is evenly divisible by 4 except every year that is evenly divisible by 100 unless the year is also evenly divisible by 400 @@ -28,9 +28,8 @@ phenomenon, go watch [this youtube video][video]. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/leap` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source JavaRanch Cattle Drive, exercise 3 [http://www.javaranch.com/leap.jsp](http://www.javaranch.com/leap.jsp) diff --git a/exercises/ledger/README.md b/exercises/ledger/README.md index a242128758..872a8da7f3 100644 --- a/exercises/ledger/README.md +++ b/exercises/ledger/README.md @@ -16,9 +16,7 @@ containing that log, this will help reviewers. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/ledger` directory. ## 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 f0bad7aa8d..77c6d4ae00 100644 --- a/exercises/linked-list/README.md +++ b/exercises/linked-list/README.md @@ -2,18 +2,18 @@ Implement a doubly linked list. -Like an array, a linked list is a simple linear data structure. Several -common data types can be implemented using linked lists, like queues, +Like an array, a linked list is a simple linear data structure. Several +common data types can be implemented using linked lists, like queues, stacks, and associative arrays. -A linked list is a collection of data elements called *nodes*. In a -*singly linked list* each node holds a value and a link to the next node. -In a *doubly linked list* each node also holds a link to the previous +A linked list is a collection of data elements called *nodes*. In a +*singly linked list* each node holds a value and a link to the next node. +In a *doubly linked list* each node also holds a link to the previous node. -You will write an implementation of a doubly linked list. Implement a -Node to hold a value and pointers to the next and previous nodes. Then -implement a List which holds references to the first and last node and +You will write an implementation of a doubly linked list. Implement a +Node to hold a value and pointers to the next and previous nodes. Then +implement a List which holds references to the first and last node and offers an array-like interface for adding and removing items: * `push` (*insert value at back*); @@ -21,17 +21,16 @@ offers an array-like interface for adding and removing items: * `shift` (*remove value at front*). * `unshift` (*insert value at front*); -To keep your implementation simple, the tests will not cover error -conditions. Specifically: `pop` or `shift` will never be called on an +To keep your implementation simple, the tests will not cover error +conditions. Specifically: `pop` or `shift` will never be called on an empty list. If you want to know more about linked lists, check [Wikipedia](https://en.wikipedia.org/wiki/Linked_list). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/linked-list` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Classic computer science topic diff --git a/exercises/list-ops/README.md b/exercises/list-ops/README.md index 26fcb813b8..896898de71 100644 --- a/exercises/list-ops/README.md +++ b/exercises/list-ops/README.md @@ -11,9 +11,7 @@ The `Foldl` and `Foldr` methods are "fold" functions, which is a concept well-kn ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/list-ops` directory. ## 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 f07488e4a4..9acc887b43 100644 --- a/exercises/luhn/README.md +++ b/exercises/luhn/README.md @@ -18,27 +18,27 @@ are disallowed. ## Example 1: valid credit card number -``` +```text 4539 1488 0343 6467 ``` The first step of the Luhn algorithm is to double every second digit, starting from the right. We will be doubling -``` +```text 4_3_ 1_8_ 0_4_ 6_6_ ``` If doubling the number results in a number greater than 9 then subtract 9 from the product. The results of our doubling: -``` +```text 8569 2478 0383 3437 ``` Then sum all of the digits: -``` +```text 8+5+6+9+2+4+7+8+0+3+8+3+3+4+3+7 = 80 ``` @@ -46,19 +46,19 @@ If the sum is evenly divisible by 10, then the number is valid. This number is v ## Example 2: invalid credit card number -``` +```text 8273 1232 7352 0569 ``` Double the second digits, starting from the right -``` +```text 7253 2262 5312 0539 ``` Sum the digits -``` +```text 7+2+5+3+2+2+6+2+5+3+1+2+0+5+3+9 = 57 ``` @@ -66,9 +66,8 @@ Sum the digits ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/luhn` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source The Luhn Algorithm on Wikipedia [http://en.wikipedia.org/wiki/Luhn_algorithm](http://en.wikipedia.org/wiki/Luhn_algorithm) diff --git a/exercises/markdown/README.md b/exercises/markdown/README.md index 6ecc98207c..d6d8e4a0b5 100644 --- a/exercises/markdown/README.md +++ b/exercises/markdown/README.md @@ -20,9 +20,7 @@ For this exercise the following C# feature comes in handy: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/markdown` directory. ## 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 e54c87401d..ae9699ff3b 100644 --- a/exercises/matrix/README.md +++ b/exercises/matrix/README.md @@ -5,13 +5,15 @@ that matrix. So given a string with embedded newlines like: -> 9 8 7 -> 5 3 2 -> 6 6 7 +```text +9 8 7 +5 3 2 +6 6 7 +``` representing this matrix: -```plain +```text 0 1 2 |--------- 0 | 9 8 7 @@ -40,9 +42,8 @@ And its columns: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/matrix` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Warmup to the `saddle-points` warmup. [http://jumpstartlab.com](http://jumpstartlab.com) diff --git a/exercises/meetup/README.md b/exercises/meetup/README.md index e259fc2a33..c88e0895b4 100644 --- a/exercises/meetup/README.md +++ b/exercises/meetup/README.md @@ -2,32 +2,34 @@ Calculate the date of meetups. -Typically meetups happen on the same day of the week. In this exercise, you will take -a description of a meetup date, and return the actual meetup date. +Typically meetups happen on the same day of the week. In this exercise, you +will take a description of a meetup date, and return the actual meetup date. Examples of general descriptions are: -- the first Monday of January 2017 -- the third Tuesday of January 2017 -- the Wednesteenth of January 2017 -- the last Thursday of January 2017 +- The first Monday of January 2017 +- The third Tuesday of January 2017 +- The wednesteenth of January 2017 +- The last Thursday of January 2017 -Note that "Monteenth", "Tuesteenth", etc are all made up words. There -was a meetup whose members realized that there are exactly 7 numbered days in a month that -end in '-teenth'. Therefore, one is guaranteed that each day of the week +The descriptors you are expected to parse are: +first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth, +thursteenth, friteenth, saturteenth, sunteenth + +Note that "monteenth", "tuesteenth", etc are all made up words. There was a +meetup whose members realized that there are exactly 7 numbered days in a month +that end in '-teenth'. Therefore, one is guaranteed that each day of the week (Monday, Tuesday, ...) will have exactly one date that is named with '-teenth' in every month. -Given examples of a meetup dates, each containing a month, day, year, and descriptor -(first, second, teenth, etc), calculate the date of the actual meetup. -For example, if given "First Monday of January 2017", the correct meetup date is 2017/1/2 - +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. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/meetup` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Jeremy Hinegardner mentioned a Boulder meetup that happens on the Wednesteenth of every month [https://twitter.com/copiousfreetime](https://twitter.com/copiousfreetime) diff --git a/exercises/minesweeper/README.md b/exercises/minesweeper/README.md index d6b497f8c4..af13a13dc5 100644 --- a/exercises/minesweeper/README.md +++ b/exercises/minesweeper/README.md @@ -28,9 +28,7 @@ into this: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/minesweeper` directory. ## 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 0c6afff51c..fcb0f9572c 100644 --- a/exercises/nth-prime/README.md +++ b/exercises/nth-prime/README.md @@ -18,9 +18,8 @@ Note: to help speedup calculation, you should not check numbers which you know b ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/nth-prime` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source A variation on Problem 7 at Project Euler [http://projecteuler.net/problem=7](http://projecteuler.net/problem=7) diff --git a/exercises/nucleotide-count/README.md b/exercises/nucleotide-count/README.md index 4a5ca0f1e2..2030439ece 100644 --- a/exercises/nucleotide-count/README.md +++ b/exercises/nucleotide-count/README.md @@ -1,30 +1,16 @@ # Nucleotide Count -Given a DNA string, compute how many times each nucleotide occurs in the string. +Given a single stranded DNA string, compute how many times each nucleotide occurs in the string. -DNA is represented by an alphabet of the following symbols: 'A', 'C', -'G', and 'T'. - -Each symbol represents a nucleotide, which is a fancy name for the -particular molecules that happen to make up a large part of DNA. - -Shortest intro to biochemistry EVAR: +The genetic language of every living thing on the planet is DNA. +DNA is a large molecule that is built from an extremely long sequence of individual elements called nucleotides. +4 types exist in DNA and these differ only slightly and can be represented as the following symbols: 'A' for adenine, 'C' for cytosine, 'G' for guanine, and 'T' thymine. +Here is an analogy: - twigs are to birds nests as -- nucleotides are to DNA and RNA as -- amino acids are to proteins as -- sugar is to starch as -- oh crap lipids - -I'm not going to talk about lipids because they're crazy complex. - -So back to nucleotides. - -DNA contains four types of them: adenine (`A`), cytosine (`C`), guanine -(`G`), and thymine (`T`). - -RNA contains a slightly different set of nucleotides, but we don't care -about that for now. +- nucleotides are to DNA as +- legos are to lego houses as +- words are to sentences as... ## Hints This exercise requires the use of a Dictionary. For more information see @@ -32,9 +18,8 @@ This exercise requires the use of a Dictionary. For more information see ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/nucleotide-count` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source The Calculating DNA Nucleotides_problem at Rosalind [http://rosalind.info/problems/dna/](http://rosalind.info/problems/dna/) diff --git a/exercises/ocr-numbers/README.md b/exercises/ocr-numbers/README.md index d388c928d9..77dc95e962 100644 --- a/exercises/ocr-numbers/README.md +++ b/exercises/ocr-numbers/README.md @@ -1,4 +1,4 @@ -# Ocr Numbers +# OCR Numbers Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled. @@ -9,7 +9,7 @@ To begin with, convert a simple binary font to a string containing 0 or 1. The binary font uses pipes and underscores, four rows high and three columns wide. -``` +```text _ # | | # zero. |_| # @@ -18,7 +18,7 @@ The binary font uses pipes and underscores, four rows high and three columns wid Is converted to "0" -``` +```text # | # one. | # @@ -39,7 +39,7 @@ Update your program to recognize multi-character binary strings, replacing garbl Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string. -``` +```text _ _| |_ @@ -48,7 +48,7 @@ Update your program to recognize all numbers 0 through 9, both individually and Is converted to "2" -``` +```text _ _ _ _ _ _ _ _ # | _| _||_||_ |_ ||_||_|| | # decimal numbers. ||_ _| | _||_| ||_| _||_| # @@ -61,7 +61,7 @@ Is converted to "1234567890" Update your program to handle multiple numbers, one per line. When converting several lines, join the lines with commas. -``` +```text _ _ | _| _| ||_ _| @@ -80,9 +80,8 @@ Is converted to "123,456,789" ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/ocr-numbers` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Inspired by the Bank OCR kata [http://codingdojo.org/cgi-bin/wiki.pl?KataBankOCR](http://codingdojo.org/cgi-bin/wiki.pl?KataBankOCR) diff --git a/exercises/octal/README.md b/exercises/octal/README.md index 6c7ce83b43..109f59a3ca 100644 --- a/exercises/octal/README.md +++ b/exercises/octal/README.md @@ -8,11 +8,13 @@ Implement octal to decimal conversion. Given an octal input string, your program should produce a decimal output. ## Note + - Implement the conversion yourself. Do not use something else to perform the conversion for you. - Treat invalid input as octal 0. ## About Octal (Base-8) + Decimal is a base-10 system. A number 233 in base 10 notation can be understood @@ -25,7 +27,8 @@ as a linear combination of powers of 10: - All these values are summed. So: -``` + +```text 233 # decimal = 2*10^2 + 3*10^1 + 3*10^0 = 2*100 + 3*10 + 3*1 @@ -34,7 +37,8 @@ So: Octal is similar, but uses powers of 8 rather than powers of 10. So: -``` + +```text 233 # octal = 2*8^2 + 3*8^1 + 3*8^0 = 2*64 + 3*8 + 3*1 @@ -44,9 +48,8 @@ So: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/octal` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source All of Computer Science [http://www.wolframalpha.com/input/?i=base+8](http://www.wolframalpha.com/input/?i=base+8) diff --git a/exercises/palindrome-products/README.md b/exercises/palindrome-products/README.md index 6bd82b3fc3..7b86e78d49 100644 --- a/exercises/palindrome-products/README.md +++ b/exercises/palindrome-products/README.md @@ -5,33 +5,32 @@ Detect palindrome products in a given range. A palindromic number is a number that remains the same when its digits are reversed. For example, `121` is a palindromic number but `112` is not. -Given the definition of a palindromic number, we define a palindrome _product_ -to be the product `c`, such that `a * b = c`, where `c` is a palindromic number and - `a` and `b` are integers (possibly, but _not_ necessarily palindromic numbers). +Given a range of numbers, find the largest and smallest palindromes which +are products of numbers within that range. -For example, the palindromic number 9009 can be written as the palindrome -product: `91 * 99 = 9009`. - -It's possible (and indeed common) for a palindrome product to be the product -of multiple combinations of numbers. For example, the palindrome product `9` has -the factors `(1, 9)`, `(3, 3)`, and `(9, 1)`. - -Write a program that given a range of integers, returns the smallest and largest -palindromic product within that range, along with all of it's factors. +Your solution should return the largest and smallest palindromes, along with the +factors of each within the range. If the largest or smallest palindrome has more +than one pair of factors within the range, then return all the pairs. ## Example 1 Given the range `[1, 9]` (both inclusive)... -The smallest product is `1`. It's factors are `(1, 1)`. -The largest product is `9`. It's factors are `(1, 9)`, `(3, 3)`, and `(9, 1)`. +And given the list of all possible products within this range: +`[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 15, 21, 24, 27, 20, 28, 32, 36, 25, 30, 35, 40, 45, 42, 48, 54, 49, 56, 63, 64, 72, 81]` + +The palindrome products are all single digit numbers (in this case): +`[1, 2, 3, 4, 5, 6, 7, 8, 9]` + +The smallest palindrome product is `1`. Its factors are `(1, 1)`. +The largest palindrome product is `9`. Its factors are `(1, 9)` and `(3, 3)`. ## Example 2 Given the range `[10, 99]` (both inclusive)... -The smallest palindrome product is `121`. It's factors are `(11, 11)`. -The largest palindrome product is `9009`. It's factors are `(91, 99)` and `(99, 91)`. +The smallest palindrome product is `121`. Its factors are `(11, 11)`. +The largest palindrome product is `9009`. Its factors are `(91, 99)`. ## Hints @@ -40,9 +39,8 @@ For more information on tuples, see [this link](https://msdn.microsoft.com/en-us ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/palindrome-products` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Problem 4 at Project Euler [http://projecteuler.net/problem=4](http://projecteuler.net/problem=4) diff --git a/exercises/pangram/README.md b/exercises/pangram/README.md index dab63ee532..14088739e7 100644 --- a/exercises/pangram/README.md +++ b/exercises/pangram/README.md @@ -2,7 +2,7 @@ Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma, "every letter") is a sentence using every letter of the alphabet at least once. -The best known English pangram is: +The best known English pangram is: > The quick brown fox jumps over the lazy dog. The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case @@ -10,9 +10,8 @@ insensitive. Input will not contain non-ASCII symbols. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/pangram` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [https://en.wikipedia.org/wiki/Pangram](https://en.wikipedia.org/wiki/Pangram) diff --git a/exercises/parallel-letter-frequency/README.md b/exercises/parallel-letter-frequency/README.md index 46c85c26a8..199384e17f 100644 --- a/exercises/parallel-letter-frequency/README.md +++ b/exercises/parallel-letter-frequency/README.md @@ -9,9 +9,7 @@ list of texts and that employs parallelism. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/parallel-letter-frequency` directory. ## 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 9ff08f7e24..da3b8aa4ef 100644 --- a/exercises/pascals-triangle/README.md +++ b/exercises/pascals-triangle/README.md @@ -1,11 +1,11 @@ -# Pascals Triangle +# Pascal's Triangle Compute Pascal's triangle up to a given number of rows. In Pascal's Triangle each number is computed by adding the numbers to the right and left of the current position in the previous row. -```plain +```text 1 1 1 1 2 1 @@ -16,9 +16,8 @@ the right and left of the current position in the previous row. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/pascals-triangle` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Pascal's Triangle at Wolfram Math World [http://mathworld.wolfram.com/PascalsTriangle.html](http://mathworld.wolfram.com/PascalsTriangle.html) diff --git a/exercises/perfect-numbers/README.md b/exercises/perfect-numbers/README.md index 9114a07079..a237132093 100644 --- a/exercises/perfect-numbers/README.md +++ b/exercises/perfect-numbers/README.md @@ -5,7 +5,7 @@ Nicomachus' (60 - 120 CE) classification scheme for natural numbers. The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for natural numbers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum](https://en.wikipedia.org/wiki/Aliquot_sum). The aliquot sum is defined as the sum of the factors of a number not including the number itself. For example, the aliquot sum of 15 is (1 + 3 + 5) = 9 -- **Perfect**: aliquot sum = number +- **Perfect**: aliquot sum = number - 6 is a perfect number because (1 + 2 + 3) = 6 - 28 is a perfect number because (1 + 2 + 4 + 7 + 14) = 28 - **Abundant**: aliquot sum > number @@ -14,14 +14,13 @@ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) d - **Deficient**: aliquot sum < number - 8 is a deficient number because (1 + 2 + 4) = 7 - Prime numbers are deficient - + 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**. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/perfect-numbers` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Taken from Chapter 2 of Functional Thinking by Neal Ford. [http://shop.oreilly.com/product/0636920029687.do](http://shop.oreilly.com/product/0636920029687.do) diff --git a/exercises/phone-number/README.md b/exercises/phone-number/README.md index 7b0d0734fa..e471ed2369 100644 --- a/exercises/phone-number/README.md +++ b/exercises/phone-number/README.md @@ -6,14 +6,15 @@ The **North American Numbering Plan (NANP)** is a telephone numbering system use NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as *area code*, followed by a seven-digit local number. The first three digits of the local number represent the *exchange code*, followed by the unique four-digit number which is the *subscriber number*. - The format is usually represented as -``` + +```text (NXX)-NXX-XXXX ``` + where `N` is any digit from 2 through 9 and `X` is any digit from 0 through 9. -Your task is to clean up differently formated telephone numbers by removing punctuation and the country code (1) if present. +Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code (1) if present. For example, the inputs - `+1 (613)-995-0253` @@ -29,9 +30,8 @@ should all produce the output ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/phone-number` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Event Manager by JumpstartLab [http://tutorials.jumpstartlab.com/projects/eventmanager.html](http://tutorials.jumpstartlab.com/projects/eventmanager.html) diff --git a/exercises/pig-latin/README.md b/exercises/pig-latin/README.md index c83ec11d46..4a8381e413 100644 --- a/exercises/pig-latin/README.md +++ b/exercises/pig-latin/README.md @@ -19,9 +19,8 @@ See for more details. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/pig-latin` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source The Pig Latin exercise at Test First Teaching by Ultrasaurus [https://github.com/ultrasaurus/test-first-teaching/blob/master/learn_ruby/pig_latin/](https://github.com/ultrasaurus/test-first-teaching/blob/master/learn_ruby/pig_latin/) diff --git a/exercises/poker/README.md b/exercises/poker/README.md index 0c2c88c3c8..43f0f189bb 100644 --- a/exercises/poker/README.md +++ b/exercises/poker/README.md @@ -7,9 +7,8 @@ overview of poker hands. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/poker` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Inspired by the training course from Udacity. [https://www.udacity.com/course/viewer#!/c-cs212/](https://www.udacity.com/course/viewer#!/c-cs212/) diff --git a/exercises/pov/README.md b/exercises/pov/README.md index db5226bce4..63f730ad7d 100644 --- a/exercises/pov/README.md +++ b/exercises/pov/README.md @@ -1,14 +1,12 @@ -# Pov +# POV Reparent a graph on a selected node. -# Tree Reparenting - This exercise is all about re-orientating a graph to see things from a different point of view. For example family trees are usually presented from the ancestor's perspective: -``` +```text +------0------+ | | | +-1-+ +-2-+ +-3-+ @@ -20,7 +18,7 @@ But the same information can be presented from the perspective of any other node in the graph, by pulling it up to the root and dragging its relationships along with it. So the same graph from 6's perspective would look like: -``` +```text 6 | +-----2-----+ @@ -41,9 +39,8 @@ of view of one of the nodes. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/pov` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Adaptation of exercise from 4clojure [https://www.4clojure.com/](https://www.4clojure.com/) diff --git a/exercises/prime-factors/README.md b/exercises/prime-factors/README.md index 57436c57c3..c2b3c16885 100644 --- a/exercises/prime-factors/README.md +++ b/exercises/prime-factors/README.md @@ -31,9 +31,8 @@ You can check this yourself: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/prime-factors` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source The Prime Factors Kata by Uncle Bob [http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata](http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata) diff --git a/exercises/protein-translation/README.md b/exercises/protein-translation/README.md index eb736fbf6c..e7ee0a243d 100644 --- a/exercises/protein-translation/README.md +++ b/exercises/protein-translation/README.md @@ -10,21 +10,21 @@ Codons: `"AUG", "UUU", "UCU"` => which become a polypeptide with the following sequence => Protein: `"Methionine", "Phenylalanine", "Serine"` - + There are 64 codons which in turn correspond to 20 amino acids; however, all of the codon sequences and resulting amino acids are not important in this exercise. If it works for one codon, the program should work for all of them. -However, feel free to expand the list in the test suite to include them all. +However, feel free to expand the list in the test suite to include them all. -There are also four terminating codons (also known as 'STOP' codons); if any of these codons are encountered (by the ribosome), all translation ends and the protein is terminated. +There are also three terminating codons (also known as 'STOP' codons); if any of these codons are encountered (by the ribosome), all translation ends and the protein is terminated. All subsequent codons after are ignored, like this: RNA: `"AUGUUUUCUUAAAUG"` => -Codons: `"AUG", "UUU", "UCU", "UAG", "AUG"` => +Codons: `"AUG", "UUU", "UCU", "UAA", "AUG"` => Protein: `"Methionine", "Phenylalanine", "Serine"` -Note the stop codon terminates the translation and the final methionine is not translated into the protein sequence. +Note the stop codon `"UAA"` terminates the translation and the final methionine is not translated into the protein sequence. Below are the codons and resulting Amino Acids needed for the exercise. @@ -39,14 +39,12 @@ UGU, UGC | Cysteine UGG | Tryptophan UAA, UAG, UGA | STOP - Learn more about [protein translation on Wikipedia](http://en.wikipedia.org/wiki/Translation_(biology)) ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/protein-translation` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Tyler Long diff --git a/exercises/proverb/README.md b/exercises/proverb/README.md index 250bfcf3e1..01cbd1df98 100644 --- a/exercises/proverb/README.md +++ b/exercises/proverb/README.md @@ -1,15 +1,20 @@ # Proverb -For want of a horseshoe nail, a kingdom was lost, or so the saying goes. Output -the full text of this proverbial rhyme: +For want of a horseshoe nail, a kingdom was lost, or so the saying goes. -> For want of a nail the shoe was lost. -> For want of a shoe the horse was lost. -> For want of a horse the rider was lost. -> For want of a rider the message was lost. -> For want of a message the battle was lost. -> For want of a battle the kingdom was lost. -> And all for the want of a horseshoe nail. +Given a list of inputs, generate the relevant proverb. For example, given the list `["nail", "shoe", "horse", "rider", "message", "battle", "kingdom"]`, you will output the full text of this proverbial rhyme: + +```text +For want of a nail the shoe was lost. +For want of a shoe the horse was lost. +For want of a horse the rider was lost. +For want of a rider the message was lost. +For want of a message the battle was lost. +For want of a battle the kingdom was lost. +And all for the want of a nail. +``` + +Note that the list of inputs may vary; your solution should be able to handle lists of arbitrary length and content. No line of the output text should be a static, unchanging string; all should vary according to the input given. ## HINTS @@ -17,9 +22,8 @@ Try to capture the structure of the song in your code, where you build up the so ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/proverb` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [http://en.wikipedia.org/wiki/For_Want_of_a_Nail](http://en.wikipedia.org/wiki/For_Want_of_a_Nail) diff --git a/exercises/pythagorean-triplet/README.md b/exercises/pythagorean-triplet/README.md index b19c1c56d8..f49e2aabab 100644 --- a/exercises/pythagorean-triplet/README.md +++ b/exercises/pythagorean-triplet/README.md @@ -3,13 +3,13 @@ A Pythagorean triplet is a set of three natural numbers, {a, b, c}, for which, -``` +```text a**2 + b**2 = c**2 ``` -For example, +For example, -``` +```text 3**2 + 4**2 = 9 + 16 = 25 = 5**2. ``` @@ -19,9 +19,8 @@ Find the product a * b * c. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/pythagorean-triplet` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Problem 9 at Project Euler [http://projecteuler.net/problem=9](http://projecteuler.net/problem=9) diff --git a/exercises/queen-attack/README.md b/exercises/queen-attack/README.md index 037e28a126..313139a512 100644 --- a/exercises/queen-attack/README.md +++ b/exercises/queen-attack/README.md @@ -11,7 +11,7 @@ A chessboard can be represented by an 8 by 8 array. So if you're told the white queen is at (2, 3) and the black queen at (5, 6), then you'd know you've got a set-up like so: -```plain +```text _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ W _ _ _ _ @@ -28,9 +28,8 @@ share a diagonal. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/queen-attack` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source J Dalbey's Programming Practice problems [http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html](http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html) diff --git a/exercises/rail-fence-cipher/README.md b/exercises/rail-fence-cipher/README.md index 31e7f18f2f..d3bd0782f4 100644 --- a/exercises/rail-fence-cipher/README.md +++ b/exercises/rail-fence-cipher/README.md @@ -11,41 +11,46 @@ Finally the message is then read off in rows. For example, using three "rails" and the message "WE ARE DISCOVERED FLEE AT ONCE", the cipherer writes out: -``` + +```text W . . . E . . . C . . . R . . . L . . . T . . . E . E . R . D . S . O . E . E . F . E . A . O . C . . . A . . . I . . . V . . . D . . . E . . . N . . ``` Then reads off: -``` + +```text WECRLTEERDSOEEFEAOCAIVDEN ``` - To decrypt a message you take the zig-zag shape and fill the ciphertext along the rows. -``` + +```text ? . . . ? . . . ? . . . ? . . . ? . . . ? . . . ? . ? . ? . ? . ? . ? . ? . ? . ? . ? . ? . ? . ? . . . ? . . . ? . . . ? . . . ? . . . ? . . . ? . . ``` The first row has seven spots that can be filled with "WECRLTE". -``` + +```text W . . . E . . . C . . . R . . . L . . . T . . . E . ? . ? . ? . ? . ? . ? . ? . ? . ? . ? . ? . ? . . . ? . . . ? . . . ? . . . ? . . . ? . . . ? . . ``` Now the 2nd row takes "ERDSOEEFEAOC". -``` + +```text W . . . E . . . C . . . R . . . L . . . T . . . E . E . R . D . S . O . E . E . F . E . A . O . C . . . ? . . . ? . . . ? . . . ? . . . ? . . . ? . . ``` Leaving "AIVDEN" for the last row. -``` + +```text W . . . E . . . C . . . R . . . L . . . T . . . E . E . R . D . S . O . E . E . F . E . A . O . C . . . A . . . I . . . V . . . D . . . E . . . N . . @@ -55,9 +60,8 @@ If you now read along the zig-zag shape you can read the original message. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/rail-fence-cipher` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [https://en.wikipedia.org/wiki/Transposition_cipher#Rail_Fence_cipher](https://en.wikipedia.org/wiki/Transposition_cipher#Rail_Fence_cipher) diff --git a/exercises/raindrops/README.md b/exercises/raindrops/README.md index f77166d261..9bb26592d5 100644 --- a/exercises/raindrops/README.md +++ b/exercises/raindrops/README.md @@ -19,9 +19,8 @@ Convert a number to a string, the contents of which depend on the number's facto ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/raindrops` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source A variation on a famous interview question intended to weed out potential candidates. [http://jumpstartlab.com](http://jumpstartlab.com) diff --git a/exercises/react/README.md b/exercises/react/README.md index 05e6eb4904..621ee0c4bb 100644 --- a/exercises/react/README.md +++ b/exercises/react/README.md @@ -21,9 +21,7 @@ In this exercise the following C# feature is used: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/react` directory. ## 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 15f04a7438..7cfb6034f9 100644 --- a/exercises/rectangles/README.md +++ b/exercises/rectangles/README.md @@ -2,7 +2,7 @@ Count the rectangles in an ASCII diagram like the one below. -``` +```text +--+ ++ | +-++--+ @@ -12,7 +12,7 @@ Count the rectangles in an ASCII diagram like the one below. The above diagram contains 6 rectangles: -``` +```text +-----+ @@ -20,7 +20,7 @@ The above diagram contains 6 rectangles: +-----+ ``` -``` +```text +--+ | | | | @@ -28,7 +28,7 @@ The above diagram contains 6 rectangles: +--+ ``` -``` +```text +--+ | | +--+ @@ -36,28 +36,28 @@ The above diagram contains 6 rectangles: ``` -``` - - +```text + + +--+ | | +--+ ``` -``` - - +```text + + +--+ | | +--+ ``` -``` - - ++ - ++ - - +```text + + ++ + ++ + + ``` You may assume that the input is always a proper rectangle (i.e. the length of @@ -65,9 +65,7 @@ every line equals the length of the first line). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/rectangles` directory. ## 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 dbe29b99c3..c3890c8290 100644 --- a/exercises/reverse-string/README.md +++ b/exercises/reverse-string/README.md @@ -1,3 +1,18 @@ +# Reverse String + Reverse a string -For example: input: "cool" output: "looc" \ No newline at end of file +For example: +input: "cool" +output: "looc" + +### Submitting Exercises + +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/reverse-string` directory. + +## Source + +Introductory challenge to reverse an input string [https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb](https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb) + +## 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/rna-transcription/README.md b/exercises/rna-transcription/README.md index f2ad375b94..de2afe2240 100644 --- a/exercises/rna-transcription/README.md +++ b/exercises/rna-transcription/README.md @@ -1,4 +1,4 @@ -# Rna Transcription +# RNA Transcription Given a DNA strand, return its RNA complement (per RNA transcription). @@ -20,12 +20,11 @@ each nucleotide with its complement: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/rna-transcription` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source -Rosalind [http://rosalind.info/problems/rna](http://rosalind.info/problems/rna) +Hyperphysics [http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html](http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html) ## 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/robot-name/README.md b/exercises/robot-name/README.md index 6d9d1f07f9..4f23a27f15 100644 --- a/exercises/robot-name/README.md +++ b/exercises/robot-name/README.md @@ -17,9 +17,8 @@ every existing robot has a unique name. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/robot-name` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source A debugging session with Paul Blackwell at gSchool. [http://gschool.it](http://gschool.it) diff --git a/exercises/robot-simulator/README.md b/exercises/robot-simulator/README.md index 19a792996c..81e5c94ad3 100644 --- a/exercises/robot-simulator/README.md +++ b/exercises/robot-simulator/README.md @@ -29,9 +29,8 @@ direction it is pointing. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/robot-simulator` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Inspired by an interview question at a famous company. diff --git a/exercises/roman-numerals/README.md b/exercises/roman-numerals/README.md index e14fd5af7a..690519c878 100644 --- a/exercises/roman-numerals/README.md +++ b/exercises/roman-numerals/README.md @@ -14,7 +14,7 @@ The Romans wrote numbers using letters - I, V, X, L, C, D, M. (notice these letters have lots of straight lines and are hence easy to hack into stone tablets). -``` +```text 1 => I 10 => X 7 => VII @@ -48,9 +48,8 @@ This exercise requires you to write an extension method. For more information, s ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/roman-numerals` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source The Roman Numeral Kata [http://codingdojo.org/cgi-bin/index.pl?KataRomanNumerals](http://codingdojo.org/cgi-bin/index.pl?KataRomanNumerals) diff --git a/exercises/rotational-cipher/README.md b/exercises/rotational-cipher/README.md index 79de328637..16fbf0ad04 100644 --- a/exercises/rotational-cipher/README.md +++ b/exercises/rotational-cipher/README.md @@ -13,7 +13,7 @@ The most commonly used rotational cipher is `ROT13`. A `ROT13` on the Latin alphabet would be as follows: -```plain +```text Plain: abcdefghijklmnopqrstuvwxyz Cipher: nopqrstuvwxyzabcdefghijklm ``` @@ -23,6 +23,7 @@ It is stronger than the Atbash cipher because it has 27 possible keys, and 25 us Ciphertext is written out in the same formatting as the input including spaces and punctuation. ## Examples + - ROT5 `omg` gives `trl` - ROT0 `c` gives `c` - ROT26 `Cool` gives `Cool` @@ -31,9 +32,8 @@ Ciphertext is written out in the same formatting as the input including spaces a ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/rotational-cipher` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [https://en.wikipedia.org/wiki/Caesar_cipher](https://en.wikipedia.org/wiki/Caesar_cipher) diff --git a/exercises/run-length-encoding/README.md b/exercises/run-length-encoding/README.md index 7ac55705fa..00401dd647 100644 --- a/exercises/run-length-encoding/README.md +++ b/exercises/run-length-encoding/README.md @@ -7,27 +7,26 @@ Run-length encoding (RLE) is a simple form of data compression, where runs For example we can represent the original 53 characters with only 13. -``` +```text "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" -> "12WB12W3B24WB" ``` RLE allows the original data to be perfectly reconstructed from the compressed data, which makes it a lossless data compression. -``` +```text "AABCCCDEEEE" -> "2AB3CD4E" -> "AABCCCDEEEE" ``` For simplicity, you can assume that the unencoded string will only contain -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 +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. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/run-length-encoding` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [https://en.wikipedia.org/wiki/Run-length_encoding](https://en.wikipedia.org/wiki/Run-length_encoding) diff --git a/exercises/saddle-points/README.md b/exercises/saddle-points/README.md index cfbb8c35cf..1eb2a6b7c6 100644 --- a/exercises/saddle-points/README.md +++ b/exercises/saddle-points/README.md @@ -4,7 +4,7 @@ Detect saddle points in a matrix. So say you have a matrix like so: -```plain +```text 0 1 2 |--------- 0 | 9 8 7 @@ -15,7 +15,7 @@ So say you have a matrix like so: It has a saddle point at (1, 0). It's called a "saddle point" because it is greater than or equal to -every element in its row and the less than or equal to every element in +every element in its row and less than or equal to every element in its column. A matrix may have zero or more saddle points. @@ -33,9 +33,8 @@ For more information on tuples, see [this link](https://msdn.microsoft.com/en-us ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/saddle-points` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source J Dalbey's Programming Practice problems [http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html](http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html) diff --git a/exercises/say/README.md b/exercises/say/README.md index a5d67e6c53..17f84c4086 100644 --- a/exercises/say/README.md +++ b/exercises/say/README.md @@ -64,9 +64,8 @@ Use _and_ (correctly) when spelling out the number in English: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/say` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source A variation on JavaRanch CattleDrive, exercise 4a [http://www.javaranch.com/say.jsp](http://www.javaranch.com/say.jsp) diff --git a/exercises/scale-generator/README.md b/exercises/scale-generator/README.md index ab7fc36dd3..e102b11f46 100644 --- a/exercises/scale-generator/README.md +++ b/exercises/scale-generator/README.md @@ -32,7 +32,6 @@ Use Flats: F, Bb, Eb, Ab, Db, Gb major d, g, c, f, bb, eb minor - The diatonic scales, and all other scales that derive from the chromatic scale, are built upon intervals. An interval is the space between two pitches. @@ -58,9 +57,7 @@ Here is a table of pitches with the names of their interval distance from the to ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/scale-generator` directory. ## 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 1970248ce5..b1f1eadfac 100644 --- a/exercises/scrabble-score/README.md +++ b/exercises/scrabble-score/README.md @@ -6,7 +6,7 @@ Given a word, compute the scrabble score for that word. You'll need these: -```plain +```text Letter Value A, E, I, O, U, L, N, R, S, T 1 D, G 2 @@ -18,6 +18,7 @@ Q, Z 10 ``` ## Examples + "cabbage" should be scored as worth 14 points: - 3 points for C @@ -34,14 +35,14 @@ And to total: - = 14 ## Extensions + - You can play a double or a triple letter. - You can play a double or a triple word. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/scrabble-score` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Inspired by the Extreme Startup game [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup) diff --git a/exercises/secret-handshake/README.md b/exercises/secret-handshake/README.md index 3bdccdba6e..870b4e65ab 100644 --- a/exercises/secret-handshake/README.md +++ b/exercises/secret-handshake/README.md @@ -6,7 +6,7 @@ You and your fellow cohort of those in the "know" when it comes to binary decide to come up with a secret "handshake". -``` +```text 1 = wink 10 = double blink 100 = close your eyes @@ -30,9 +30,8 @@ has caused the array to be reversed. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/secret-handshake` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Bert, in Mary Poppins [http://www.imdb.com/title/tt0058331/quotes/qt0437047](http://www.imdb.com/title/tt0058331/quotes/qt0437047) diff --git a/exercises/series/README.md b/exercises/series/README.md index 60d824b165..7f1f162e00 100644 --- a/exercises/series/README.md +++ b/exercises/series/README.md @@ -22,9 +22,8 @@ in the input; the digits need not be *numerically consecutive*. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/series` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source A subset of the Problem 8 at Project Euler [http://projecteuler.net/problem=8](http://projecteuler.net/problem=8) diff --git a/exercises/sgf-parsing/README.md b/exercises/sgf-parsing/README.md index c2953bc5e0..a92a543929 100644 --- a/exercises/sgf-parsing/README.md +++ b/exercises/sgf-parsing/README.md @@ -1,4 +1,4 @@ -# Sgf Parsing +# SGF Parsing Parsing a Smart Game Format string. @@ -12,7 +12,7 @@ multiple values. An SGF file may look like this: -``` +```text (;FF[4]C[root]SZ[19];B[aa];W[ab]) ``` @@ -34,7 +34,7 @@ SGF can encode variations of play. Go players do a lot of backtracking in their reviews (let's try this, doesn't work, let's try that) and SGF supports variations of play sequences. For example: -``` +```text (;FF[4](;B[aa];W[ab])(;B[dd];W[ee])) ``` @@ -46,7 +46,7 @@ opening to take the corner). A key can have multiple values associated with it. For example: -``` +```text (;FF[4];AB[aa][ab][ba]) ``` @@ -70,9 +70,7 @@ data types of properties, just use the rules for the ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/sgf-parsing` directory. ## 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 2fdfed5bef..e8d0670763 100644 --- a/exercises/sieve/README.md +++ b/exercises/sieve/README.md @@ -29,9 +29,8 @@ correct list of primes. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/sieve` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Sieve of Eratosthenes at Wikipedia [http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes](http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes) diff --git a/exercises/simple-cipher/README.md b/exercises/simple-cipher/README.md index de0db7fee3..3501f00019 100644 --- a/exercises/simple-cipher/README.md +++ b/exercises/simple-cipher/README.md @@ -47,7 +47,7 @@ Given the key "aaaaaaaaaaaaaaaaaa", encoding the string "iamapandabear" would return the original "iamapandabear". Given the key "ddddddddddddddddd", encoding our string "iamapandabear" -would return the obscured "lpdsdqgdehdu" +would return the obscured "ldpdsdqgdehdu" In the example above, we've set a = 0 for the key value. So when the plaintext is added to the key, we end up with the same message coming @@ -58,15 +58,13 @@ would get the same thing as the Caesar Cipher. The weakest link in any cipher is the human being. Let's make your substitution cipher a little more fault tolerant by providing a source -of randomness and ensuring that the key is not composed of numbers or -capital letters. +of randomness and ensuring that the key contains only lowercase letters. If someone doesn't submit a key at all, generate a truly random key of -at least 100 characters in length, accessible via Cipher#key (the # -syntax means instance variable) +at least 100 characters in length. -If the key submitted has capital letters or numbers, throw an -ArgumentError with a message to that effect. +If the key submitted is not composed only of lowercase letters, your +solution should handle the error in a language-appropriate way. ## Extensions @@ -85,9 +83,8 @@ on Wikipedia][dh] for one of the first implementations of this scheme. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/simple-cipher` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Substitution Cipher at Wikipedia [http://en.wikipedia.org/wiki/Substitution_cipher](http://en.wikipedia.org/wiki/Substitution_cipher) diff --git a/exercises/simple-linked-list/README.md b/exercises/simple-linked-list/README.md index 212526d681..7e77ac8fdd 100644 --- a/exercises/simple-linked-list/README.md +++ b/exercises/simple-linked-list/README.md @@ -27,9 +27,8 @@ For more information, see [this page](https://msdn.microsoft.com/en-us/library/9 ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/simple-linked-list` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Inspired by 'Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby', singly linked-lists. [http://www.brpreiss.com/books/opus8/html/page96.html#SECTION004300000000000000000](http://www.brpreiss.com/books/opus8/html/page96.html#SECTION004300000000000000000) diff --git a/exercises/space-age/README.md b/exercises/space-age/README.md index 03f12bf20e..1672c17761 100644 --- a/exercises/space-age/README.md +++ b/exercises/space-age/README.md @@ -12,16 +12,15 @@ Given an age in seconds, calculate how old someone would be on: - Neptune: orbital period 164.79132 Earth years So if you were told someone were 1,000,000,000 seconds old, you should -be able to say that they're 31 Earth-years old. +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). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/space-age` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=01](http://pine.fm/LearnToProgram/?Chapter=01) diff --git a/exercises/spiral-matrix/README.md b/exercises/spiral-matrix/README.md index 2ea565a6c5..b044e23a8b 100644 --- a/exercises/spiral-matrix/README.md +++ b/exercises/spiral-matrix/README.md @@ -1,4 +1,4 @@ -# Spiral Matrix +# Spiral Matrix Given the size, return a square matrix of numbers in spiral order. @@ -6,17 +6,17 @@ The matrix should be filled with natural numbers, starting from 1 in the top-left corner, increasing in an inward, clockwise spiral order, like these examples: -##### Spiral matrix of size 3 +###### Spiral matrix of size 3 -```plain +```text 1 2 3 8 9 4 7 6 5 ``` -##### Spiral matrix of size 4 +###### Spiral matrix of size 4 -```plain +```text 1 2 3 4 12 13 14 5 11 16 15 6 @@ -25,11 +25,10 @@ like these examples: ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/spiral-matrix` directory. ## Source + Reddit r/dailyprogrammer challenge #320 [Easy] Spiral Ascension. [https://www.reddit.com/r/dailyprogrammer/comments/6i60lr/20170619_challenge_320_easy_spiral_ascension/](https://www.reddit.com/r/dailyprogrammer/comments/6i60lr/20170619_challenge_320_easy_spiral_ascension/) ## Submitting Incomplete Solutions diff --git a/exercises/strain/README.md b/exercises/strain/README.md index 1c780b8590..34968f37cf 100644 --- a/exercises/strain/README.md +++ b/exercises/strain/README.md @@ -35,9 +35,8 @@ basic tools instead. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/strain` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Conversation with James Edward Gray II [https://twitter.com/jeg2](https://twitter.com/jeg2) diff --git a/exercises/sublist/README.md b/exercises/sublist/README.md index 1bca4bcef6..c27e53b32c 100644 --- a/exercises/sublist/README.md +++ b/exercises/sublist/README.md @@ -24,9 +24,7 @@ For more information, see [this page](https://msdn.microsoft.com/en-us/library/s ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/sublist` directory. ## 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 68f9fdf25d..12775bc401 100644 --- a/exercises/sum-of-multiples/README.md +++ b/exercises/sum-of-multiples/README.md @@ -1,25 +1,21 @@ # Sum Of Multiples -Given a number, find the sum of all the multiples of particular numbers up to +Given a number, find the sum of all the unique multiples of particular numbers up to but not including that number. -If we list all the natural numbers up to but not including 20 that are -multiples of either 3 or 5, we get 3, 5, 6 and 9, 10, 12, 15, and 18. +If we list all the natural numbers below 20 that are multiples of 3 or 5, +we get 3, 5, 6, 9, 10, 12, 15, and 18. The sum of these multiples is 78. -Given a number, find the sum of the multiples of a given set of numbers, -up to but not including that number. - ## Hints 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). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/sum-of-multiples` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source A variation on Problem 1 at Project Euler [http://projecteuler.net/problem=1](http://projecteuler.net/problem=1) diff --git a/exercises/tournament/README.md b/exercises/tournament/README.md index 5ab70c3ee0..f866c7956f 100644 --- a/exercises/tournament/README.md +++ b/exercises/tournament/README.md @@ -5,7 +5,7 @@ Tally the results of a small football competition. Based on an input file containing which team played against which and what the outcome was, create a file with a table like this: -``` +```text Team | MP | W | D | L | P Devastating Donkeys | 3 | 2 | 1 | 0 | 7 Allegoric Alaskans | 3 | 2 | 0 | 1 | 6 @@ -31,7 +31,7 @@ Input Your tallying program will receive input that looks like: -``` +```text Allegoric Alaskans;Blithering Badgers;win Devastating Donkeys;Courageous Californians;draw Devastating Donkeys;Allegoric Alaskans;win @@ -42,7 +42,7 @@ Allegoric Alaskans;Courageous Californians;win The result of the match refers to the first team listed. So this line -``` +```text Allegoric Alaskans;Blithering Badgers;win ``` @@ -50,7 +50,7 @@ Means that the Allegoric Alaskans beat the Blithering Badgers. This line: -``` +```text Courageous Californians;Blithering Badgers;loss ``` @@ -58,7 +58,7 @@ Means that the Blithering Badgers beat the Courageous Californians. And this line: -``` +```text Devastating Donkeys;Courageous Californians;draw ``` @@ -66,9 +66,7 @@ Means that the Devastating Donkeys and Courageous Californians tied. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/tournament` directory. ## 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 eea2957d31..fba2de1ade 100644 --- a/exercises/transpose/README.md +++ b/exercises/transpose/README.md @@ -4,14 +4,14 @@ Given an input text output it transposed. Roughly explained, the transpose of a matrix: -``` +```text ABC DEF ``` is given by: -``` +```text AD BE CF @@ -26,14 +26,14 @@ If the input has rows of different lengths, this is to be solved as follows: Therefore, transposing this matrix: -``` +```text ABC DE ``` results in: -``` +```text AD BE C @@ -41,28 +41,27 @@ C And transposing: -``` +```text AB DEF ``` results in: -``` +```text AD BE F ``` In general, all characters from the input should also be present in the transposed output. -That means that if a column in the input text contains only spaces on its bottom-most row(s), +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). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/transpose` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Reddit r/dailyprogrammer challenge #270 [Easy]. [https://www.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text](https://www.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text) diff --git a/exercises/tree-building/README.md b/exercises/tree-building/README.md index e3c5c974a3..a239cf1f5b 100644 --- a/exercises/tree-building/README.md +++ b/exercises/tree-building/README.md @@ -11,12 +11,12 @@ Your job will be to refactor a working but slow and ugly piece of code that implements the tree building logic for highly abstracted records. The records only contain an ID number and a parent ID number. The ID number is always between 0 (inclusive) and the length of the record list (exclusive). All records -have a parent ID lower than their own ID, except for the root record, which has +have a parent ID lower than their own ID, except for the root record, which has a parent ID that's equal to its own ID. An example tree: -
+```text
 root (ID: 0, parent ID: 0)
 |-- child1 (ID: 1, parent ID: 0)
 |    |-- grandchild1 (ID: 2, parent ID: 1)
@@ -24,13 +24,11 @@ root (ID: 0, parent ID: 0)
 +-- child2 (ID: 3, parent ID: 0)
 |    +-- grandchild3 (ID: 6, parent ID: 3)
 +-- child3 (ID: 5, parent ID: 0)
-
+``` ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/tree-building` directory. ## 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 9aeacbac11..b2e72c666c 100644 --- a/exercises/triangle/README.md +++ b/exercises/triangle/README.md @@ -2,28 +2,30 @@ Determine if a triangle is equilateral, isosceles, or scalene. -An _equilateral_ triangle has all three sides the same length.
+An _equilateral_ triangle has all three sides the same length. + An _isosceles_ triangle has at least two sides the same length. (It is sometimes specified as having exactly two sides the same length, but for the purposes of -this exercise we'll say at least two.)
+this exercise we'll say at least two.) + A _scalene_ triangle has all sides of different lengths. ## Note -For a shape to be a triangle at all, all sides have to be of length > 0, and -the sum of the lengths of any two sides must be greater than or equal to the +For a shape to be a triangle at all, all sides have to be of length > 0, and +the sum of the lengths of any two sides must be greater than or equal to the length of the third side. See [Triangle Inequality](https://en.wikipedia.org/wiki/Triangle_inequality). ## Dig Deeper -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 +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. + ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/triangle` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source The Ruby Koans triangle project, parts 1 & 2 [http://rubykoans.com](http://rubykoans.com) diff --git a/exercises/trinary/README.md b/exercises/trinary/README.md index fd06c96dba..193dead5b4 100644 --- a/exercises/trinary/README.md +++ b/exercises/trinary/README.md @@ -11,7 +11,7 @@ Trinary numbers contain three symbols: 0, 1, and 2. The last place in a trinary number is the 1's place. The second to last is the 3's place, the third to last is the 9's place, etc. -```bash +```shell # "102012" 1 0 2 0 1 2 # the number 1*3^5 + 0*3^4 + 2*3^3 + 0*3^2 + 1*3^1 + 2*3^0 # the value @@ -23,9 +23,8 @@ conversion, pretend it doesn't exist and implement it yourself. ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/trinary` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source All of Computer Science [http://www.wolframalpha.com/input/?i=binary&a=*C.binary-_*MathWorld-](http://www.wolframalpha.com/input/?i=binary&a=*C.binary-_*MathWorld-) diff --git a/exercises/twelve-days/README.md b/exercises/twelve-days/README.md index 4faf98a8e0..8f1dd40f35 100644 --- a/exercises/twelve-days/README.md +++ b/exercises/twelve-days/README.md @@ -2,7 +2,7 @@ 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. @@ -34,9 +34,8 @@ On the twelfth day of Christmas my true love gave to me, twelve Drummers Drummin ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/twelve-days` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [http://en.wikipedia.org/wiki/The_Twelve_Days_of_Christmas_(song)](http://en.wikipedia.org/wiki/The_Twelve_Days_of_Christmas_(song)) diff --git a/exercises/two-bucket/README.md b/exercises/two-bucket/README.md index f803bdec6e..0571998373 100644 --- a/exercises/two-bucket/README.md +++ b/exercises/two-bucket/README.md @@ -4,22 +4,22 @@ Given two buckets of different size, demonstrate how to measure an exact number Since this mathematical problem is fairly subject to interpretation / individual approach, the tests have been written specifically to expect one overarching solution. -To help, the tests provide you with which bucket to fill first. That means, when starting with the larger bucket full, you are NOT allowed at any point to have the smaller bucket full and the larger bucket empty (aka, the opposite starting point); that would defeat the purpose of comparing both approaches! +To help, the tests provide you with which bucket to fill first. That means, when starting with the larger bucket full, you are NOT allowed at any point to have the smaller bucket full and the larger bucket empty (aka, the opposite starting point); that would defeat the purpose of comparing both approaches! Your program will take as input: -- the size of bucket one, passed as a numeric value -- the size of bucket two, passed as a numeric value -- the desired number of liters to reach, passed as a numeric value -- which bucket to fill first, passed as a String (either 'one' or 'two') +- the size of bucket one +- the size of bucket two +- the desired number of liters to reach +- which bucket to fill first, either bucket one or bucket two Your program should determine: -- the total number of "moves" it should take to reach the desired number of liters, including the first fill - expects a numeric value -- which bucket should end up with the desired number of liters (let's say this is bucket A) - expects a String (either 'one' or 'two') -- how many liters are left in the other bucket (bucket B) - expects a numeric value +- the total number of "moves" it should take to reach the desired number of liters, including the first fill +- which bucket should end up with the desired number of liters (let's say this is bucket A) - either bucket one or bucket two +- how many liters are left in the other bucket (bucket B) -Note: any time a change is made to either or both buckets counts as one (1) move. +Note: any time a change is made to either or both buckets counts as one (1) move. -Example: +Example: Bucket one can hold up to 7 liters, and bucket two can hold up to 11 liters. Let's say bucket one, at a given step, is holding 7 liters, and bucket two is holding 8 liters (7,8). If you empty bucket one and make no change to bucket two, leaving you with 0 liters and 8 liters respectively (0,8), that counts as one "move". Instead, if you had poured from bucket one into bucket two until bucket two was full, leaving you with 4 liters in bucket one and 11 liters in bucket two (4,11), that would count as only one "move" as well. To conclude, the only valid moves are: @@ -31,9 +31,8 @@ Written with <3 at [Fullstack Academy](http://www.fullstackacademy.com/) by [Lin ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/two-bucket` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Water Pouring Problem [http://demonstrations.wolfram.com/WaterPouringProblem/](http://demonstrations.wolfram.com/WaterPouringProblem/) diff --git a/exercises/two-fer/README.md b/exercises/two-fer/README.md index 737357652e..b67052f0ed 100644 --- a/exercises/two-fer/README.md +++ b/exercises/two-fer/README.md @@ -1,25 +1,24 @@ -# Two Fer - -Create a sentence of the form "One for X, one for me." +# Two Fer `Two-fer` or `2-fer` is short for two for one. One for you and one for me. -```plain +```text "One for X, one for me." ``` When X is a name or "you". -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." +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." -### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +### Submitting Exercises -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/two-fer` directory. ## Source -This is an exercise to introduce users to basic programming constructs, just after Hello World. [https://en.wikipedia.org/wiki/Two-fer](https://en.wikipedia.org/wiki/Two-fer) + +[https://en.wikipedia.org/wiki/Two-fer](https://en.wikipedia.org/wiki/Two-fer) ## 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/variable-length-quantity/README.md b/exercises/variable-length-quantity/README.md index 7858236746..55802b21f2 100644 --- a/exercises/variable-length-quantity/README.md +++ b/exercises/variable-length-quantity/README.md @@ -5,18 +5,17 @@ Implement variable length quantity encoding and decoding. The goal of this exercise is to implement [VLQ](https://en.wikipedia.org/wiki/Variable-length_quantity) encoding/decoding. In short, the goal of this encoding is to encode integer values in a way that would save bytes. -Only the first 7 bits of each byte is significant (right-justified; sort of like an ASCII byte). -So, if you have a 32-bit value, you have to unpack it into a series of 7-bit bytes. -Of course, you will have a variable number of bytes depending upon your integer. +Only the first 7 bits of each byte is significant (right-justified; sort of like an ASCII byte). +So, if you have a 32-bit value, you have to unpack it into a series of 7-bit bytes. +Of course, you will have a variable number of bytes depending upon your integer. To indicate which is the last byte of the series, you leave bit #7 clear. -In all of the preceding bytes, you set bit #7. +In all of the preceding bytes, you set bit #7. -So, if an integer is between `0-127`, it can be represented as one byte. +So, if an integer is between `0-127`, it can be represented as one byte. Although VLQ can deal with numbers of arbitrary sizes, for this exercise we will restrict ourselves to only numbers that fit in a 32-bit unsigned integer. Here are examples of integers as 32-bit values, and the variable length quantities that they translate to: - -``` +```text NUMBER VARIABLE QUANTITY 00000000 00 00000040 40 @@ -39,9 +38,8 @@ This exercise requires you to use bitwise operations. For more information, see ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/variable-length-quantity` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source A poor Splice developer having to implement MIDI encoding/decoding. [https://splice.com](https://splice.com) diff --git a/exercises/word-count/README.md b/exercises/word-count/README.md index 40719dd4cd..ebd228a92b 100644 --- a/exercises/word-count/README.md +++ b/exercises/word-count/README.md @@ -4,19 +4,17 @@ Given a phrase, count the occurrences of each word in that phrase. For example for the input `"olly olly in come free"` -```plain +```text olly: 2 in: 1 come: 1 free: 1 ``` - ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/word-count` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour. diff --git a/exercises/word-search/README.md b/exercises/word-search/README.md index dca54fe853..5b0e643b1f 100644 --- a/exercises/word-search/README.md +++ b/exercises/word-search/README.md @@ -5,7 +5,7 @@ words in them. For example: -``` +```text jefblpepre camdcimgtc oivokprjsm @@ -35,9 +35,7 @@ For more information on Tuples, see [this link](https://msdn.microsoft.com/en-us ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/word-search` directory. ## 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 f2bc14a894..943f7930e6 100644 --- a/exercises/wordy/README.md +++ b/exercises/wordy/README.md @@ -2,7 +2,6 @@ Parse and evaluate simple math word problems returning the answer as an integer. - ## Iteration 1 — Addition Add two numbers together. @@ -13,7 +12,6 @@ Evaluates to 18. Handle large numbers and negative numbers. - ## Iteration 2 — Subtraction, Multiplication and Division Now, perform the other three operations. @@ -30,7 +28,6 @@ Now, perform the other three operations. 5 - ## Iteration 3 — Multiple Operations Handle a set of operations, in sequence. @@ -46,7 +43,6 @@ left-to-right, _ignoring the typical order of operations._ 15 (i.e. not 9) - ## Bonus — Exponentials If you'd like, handle exponentials. @@ -55,16 +51,14 @@ If you'd like, handle exponentials. 32 - ## Hints - 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/). ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/wordy` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Inspired by one of the generated questions in the Extreme Startup game. [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup) diff --git a/exercises/zebra-puzzle/README.md b/exercises/zebra-puzzle/README.md index 2db08db8ec..766ac33a88 100644 --- a/exercises/zebra-puzzle/README.md +++ b/exercises/zebra-puzzle/README.md @@ -32,9 +32,8 @@ For more information, see [this page](https://xosfaere.wordpress.com/2010/03/21/ ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/zebra-puzzle` directory. -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. ## Source Wikipedia [https://en.wikipedia.org/wiki/Zebra_Puzzle](https://en.wikipedia.org/wiki/Zebra_Puzzle) diff --git a/exercises/zipper/README.md b/exercises/zipper/README.md index c2b599a78f..54ee8a6a8f 100644 --- a/exercises/zipper/README.md +++ b/exercises/zipper/README.md @@ -3,7 +3,7 @@ Creating a zipper for a binary tree. [Zippers](https://en.wikipedia.org/wiki/Zipper_%28data_structure%29) are -a way purely functional of navigating within a data structure and +a purely functional way of navigating within a data structure and manipulating it. They essentially contain a data structure and a pointer into that data structure (called the focus). @@ -33,9 +33,7 @@ This exercise deals with custom equality. For more information see [this page.]( ### Submitting Exercises -Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/` directory. - -For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit /csharp/bob/bob.cs`. +Note that, when trying to submit an exercise, make sure the exercise file that you're submitting is in the `exercism/csharp/zipper` directory. ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise.