Skip to content

Commit 3553082

Browse files
author
Katrina Owen
committed
Generate the exercise READMEs from the new templates
1 parent 912596f commit 3553082

File tree

105 files changed

+5003
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+5003
-0
lines changed

exercises/accumulate/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Accumulate
2+
3+
Implement the `accumulate` operation, which, given a collection and an
4+
operation to perform on each element of the collection, returns a new
5+
collection containing the result of applying that operation to each element of
6+
the input collection.
7+
8+
Given the collection of numbers:
9+
10+
- 1, 2, 3, 4, 5
11+
12+
And the operation:
13+
14+
- square a number (`x => x * x`)
15+
16+
Your code should be able to produce the collection of squares:
17+
18+
- 1, 4, 9, 16, 25
19+
20+
Check out the test suite to see the expected function signature.
21+
22+
## Restrictions
23+
24+
Keep your hands off that collect/map/fmap/whatchamacallit functionality
25+
provided by your standard library!
26+
Solve this one yourself using other basic tools instead.
27+
28+
Lisp specific: it's perfectly fine to use `MAPCAR` or the equivalent,
29+
as this is idiomatic Lisp, not a library function.
30+
31+
## Hints
32+
This exercise requires you to write an extension method. For more information, see [this page](https://msdn.microsoft.com/en-us//library/bb383977.aspx).
33+
34+
### Submitting Exercises
35+
36+
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
37+
38+
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`.
39+
## Source
40+
41+
Conversation with James Edward Gray II [https://twitter.com/jeg2](https://twitter.com/jeg2)
42+
43+
## Submitting Incomplete Solutions
44+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
45+

exercises/acronym/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Acronym
2+
3+
Convert a phrase to its acronym.
4+
5+
Techies love their TLA (Three Letter Acronyms)!
6+
7+
Help generate some jargon by writing a program that converts a long name
8+
like Portable Network Graphics to its acronym (PNG).
9+
10+
11+
### Submitting Exercises
12+
13+
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
14+
15+
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`.
16+
## Source
17+
18+
Julien Vanier [https://github.com/monkbroc](https://github.com/monkbroc)
19+
20+
## Submitting Incomplete Solutions
21+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
22+

exercises/all-your-base/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# All Your Base
2+
3+
Convert a number, represented as a sequence of digits in one base, to any other base.
4+
5+
Implement general base conversion. Given a number in base **a**,
6+
represented as a sequence of digits, convert it to base **b**.
7+
8+
## Note
9+
- Try to implement the conversion yourself.
10+
Do not use something else to perform the conversion for you.
11+
12+
## About [Positional Notation](https://en.wikipedia.org/wiki/Positional_notation)
13+
14+
In positional notation, a number in base **b** can be understood as a linear
15+
combination of powers of **b**.
16+
17+
The number 42, *in base 10*, means:
18+
19+
(4 * 10^1) + (2 * 10^0)
20+
21+
The number 101010, *in base 2*, means:
22+
23+
(1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0)
24+
25+
The number 1120, *in base 3*, means:
26+
27+
(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0)
28+
29+
I think you got the idea!
30+
31+
32+
*Yes. Those three numbers above are exactly the same. Congratulations!*
33+
34+
### Submitting Exercises
35+
36+
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
37+
38+
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`.
39+
40+
## Submitting Incomplete Solutions
41+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
42+

exercises/allergies/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Allergies
2+
3+
Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.
4+
5+
An allergy test produces a single numeric score which contains the
6+
information about all the allergies the person has (that they were
7+
tested for).
8+
9+
The list of items (and their value) that were tested are:
10+
11+
* eggs (1)
12+
* peanuts (2)
13+
* shellfish (4)
14+
* strawberries (8)
15+
* tomatoes (16)
16+
* chocolate (32)
17+
* pollen (64)
18+
* cats (128)
19+
20+
So if Tom is allergic to peanuts and chocolate, he gets a score of 34.
21+
22+
Now, given just that score of 34, your program should be able to say:
23+
24+
- Whether Tom is allergic to any one of those allergens listed above.
25+
- All the allergens Tom is allergic to.
26+
27+
Note: a given score may include allergens **not** listed above (i.e.
28+
allergens that score 256, 512, 1024, etc.). Your program should
29+
ignore those components of the score. For example, if the allergy
30+
score is 257, your program should only report the eggs (1) allergy.
31+
32+
33+
## Hints
34+
This exercise requires you to use bitwise operations. For more information, see [this page](https://msdn.microsoft.com/en-us/library/6a71f45d.aspx).
35+
36+
### Submitting Exercises
37+
38+
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
39+
40+
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`.
41+
## Source
42+
43+
Jumpstart Lab Warm-up [http://jumpstartlab.com](http://jumpstartlab.com)
44+
45+
## Submitting Incomplete Solutions
46+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
47+

exercises/alphametics/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Alphametics
2+
3+
Write a function to solve alphametics puzzles.
4+
5+
[Alphametics](https://en.wikipedia.org/wiki/Alphametics) is a puzzle where
6+
letters in words are replaced with numbers.
7+
8+
For example `SEND + MORE = MONEY`:
9+
10+
```
11+
S E N D
12+
M O R E +
13+
-----------
14+
M O N E Y
15+
```
16+
17+
Replacing these with valid numbers gives:
18+
19+
```
20+
9 5 6 7
21+
1 0 8 5 +
22+
-----------
23+
1 0 6 5 2
24+
```
25+
26+
This is correct because every letter is replaced by a different number and the
27+
words, translated into numbers, then make a valid sum.
28+
29+
Each letter must represent a different digit, and the leading digit of
30+
a multi-digit number must not be zero.
31+
32+
Write a function to solve alphametics puzzles.
33+
34+
## Hints
35+
- 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/).
36+
- You can solve this exercise with a brute force algorithm, but this will possibly have a poor runtime performance.
37+
Try to find a more sophisticated solution.
38+
- Hint: You could try the column-wise addition algorithm that is usually taught in school.
39+
40+
41+
### Submitting Exercises
42+
43+
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
44+
45+
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`.
46+
47+
## Submitting Incomplete Solutions
48+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
49+

exercises/anagram/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Anagram
2+
3+
Given a word and a list of possible anagrams, select the correct sublist.
4+
5+
Given `"listen"` and a list of candidates like `"enlists" "google"
6+
"inlets" "banana"` the program should return a list containing
7+
`"inlets"`.
8+
9+
### Submitting Exercises
10+
11+
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
12+
13+
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`.
14+
## Source
15+
16+
Inspired by the Extreme Startup game [https://github.com/rchatley/extreme_startup](https://github.com/rchatley/extreme_startup)
17+
18+
## Submitting Incomplete Solutions
19+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
20+

exercises/atbash-cipher/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Atbash Cipher
2+
3+
Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.
4+
5+
The Atbash cipher is a simple substitution cipher that relies on
6+
transposing all the letters in the alphabet such that the resulting
7+
alphabet is backwards. The first letter is replaced with the last
8+
letter, the second with the second-last, and so on.
9+
10+
An Atbash cipher for the Latin alphabet would be as follows:
11+
12+
```plain
13+
Plain: abcdefghijklmnopqrstuvwxyz
14+
Cipher: zyxwvutsrqponmlkjihgfedcba
15+
```
16+
17+
It is a very weak cipher because it only has one possible key, and it is
18+
a simple monoalphabetic substitution cipher. However, this may not have
19+
been an issue in the cipher's time.
20+
21+
Ciphertext is written out in groups of fixed length, the traditional group size
22+
being 5 letters, and punctuation is excluded. This is to make it harder to guess
23+
things based on word boundaries.
24+
25+
## Examples
26+
- Encoding `test` gives `gvhg`
27+
- Decoding `gvhg` gives `test`
28+
- Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog`
29+
30+
### Submitting Exercises
31+
32+
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
33+
34+
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`.
35+
## Source
36+
37+
Wikipedia [http://en.wikipedia.org/wiki/Atbash](http://en.wikipedia.org/wiki/Atbash)
38+
39+
## Submitting Incomplete Solutions
40+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
41+

exercises/bank-account/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Bank Account
2+
3+
Simulate a bank account supporting opening/closing, withdrawals, and deposits
4+
of money. Watch out for concurrent transactions!
5+
6+
A bank account can be accessed in multiple ways. Clients can make
7+
deposits and withdrawals using the internet, mobile phones, etc. Shops
8+
can charge against the account.
9+
10+
Create an account that can be accessed from multiple threads/processes
11+
(terminology depends on your programming language).
12+
13+
It should be possible to close an account; operations against a closed
14+
account must fail.
15+
16+
## Instructions
17+
18+
Run the test file, and fix each of the errors in turn. When you get the
19+
first test to pass, go to the first pending or skipped test, and make
20+
that pass as well. When all of the tests are passing, feel free to
21+
submit.
22+
23+
Remember that passing code is just the first step. The goal is to work
24+
towards a solution that is as readable and expressive as you can make
25+
it.
26+
27+
Have fun!
28+
29+
## Hints
30+
This exercise requires you to handle data related to currency and money. A normal approuch is to use the [Decimal](https://msdn.microsoft.com/en-US/library/system.decimal.aspx) struct to store currency values.
31+
Note though that you then only store the numeric value of a currency.
32+
33+
34+
### Submitting Exercises
35+
36+
Note that, when trying to submit an exercise, make sure you're exercise file you're submitting is in the `exercism/csharp/<exerciseName>` directory.
37+
38+
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`.
39+
40+
## Submitting Incomplete Solutions
41+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
42+

0 commit comments

Comments
 (0)