Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/exercise_readme.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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

{{ . }}
Expand Down
5 changes: 0 additions & 5 deletions docs/EXERCISE_README_INSERT.md

This file was deleted.

6 changes: 1 addition & 5 deletions exercises/accumulate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

Conversation with James Edward Gray II [https://twitter.com/jeg2](https://twitter.com/jeg2)
Expand Down
4 changes: 1 addition & 3 deletions exercises/acronym/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

Julien Vanier [https://github.com/monkbroc](https://github.com/monkbroc)
Expand Down
6 changes: 2 additions & 4 deletions exercises/all-your-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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/<exerciseName>` directory.

For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/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.
4 changes: 1 addition & 3 deletions exercises/allergies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

Jumpstart Lab Warm-up [http://jumpstartlab.com](http://jumpstartlab.com)
Expand Down
8 changes: 3 additions & 5 deletions exercises/alphametics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 +
-----------
Expand All @@ -16,7 +16,7 @@ M O N E Y

Replacing these with valid numbers gives:

```
```text
9 5 6 7
1 0 8 5 +
-----------
Expand All @@ -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/<exerciseName>` directory.

For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/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.
3 changes: 1 addition & 2 deletions exercises/anagram/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

Inspired by the Extreme Startup game [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup)
Expand Down
15 changes: 14 additions & 1 deletion exercises/armstrong-numbers/README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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.
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.
6 changes: 3 additions & 3 deletions exercises/atbash-cipher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

Wikipedia [http://en.wikipedia.org/wiki/Atbash](http://en.wikipedia.org/wiki/Atbash)
Expand Down
4 changes: 1 addition & 3 deletions exercises/bank-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<exerciseName>` directory.

For example, if you're submitting `bob.cs` for the Bob exercise, the submit command would be something like `exercism submit <path_to_exercism_dir>/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.
7 changes: 3 additions & 4 deletions exercises/beer-song/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

Learn to Program by Chris Pine [http://pine.fm/LearnToProgram/?Chapter=06](http://pine.fm/LearnToProgram/?Chapter=06)
Expand Down
3 changes: 1 addition & 2 deletions exercises/binary-search-tree/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

Josh Cheek [https://twitter.com/josh_cheek](https://twitter.com/josh_cheek)
Expand Down
3 changes: 1 addition & 2 deletions exercises/binary-search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

Wikipedia [http://en.wikipedia.org/wiki/Binary_search_algorithm](http://en.wikipedia.org/wiki/Binary_search_algorithm)
Expand Down
5 changes: 3 additions & 2 deletions exercises/binary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/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-)
Expand Down
6 changes: 3 additions & 3 deletions exercises/bob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/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)
Expand Down
13 changes: 6 additions & 7 deletions exercises/book-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

Inspired by the harry potter kata from Cyber-Dojo. [http://cyber-dojo.org](http://cyber-dojo.org)
Expand Down
29 changes: 21 additions & 8 deletions exercises/bowling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.

Expand All @@ -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/<exerciseName>` 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 <path_to_exercism_dir>/csharp/bob/bob.cs`.
## Source

The Bowling Game Kata at but UncleBob [http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata](http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata)
Expand Down
Loading