Skip to content

Commit

Permalink
Merge pull request #917 from petertseng/readmes
Browse files Browse the repository at this point in the history
README updates from problem-specifications
  • Loading branch information
sshine authored Nov 14, 2020
2 parents 0d8836a + 46a30c4 commit ff84a7a
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 17 deletions.
7 changes: 5 additions & 2 deletions exercises/grade-school/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ In the end, you should be able to:
as 1, 2, 3, etc., and students within a grade should be sorted
alphabetically by name.
- "Who all is enrolled in school right now?"
- "Grade 1: Anna, Barb, and Charlie. Grade 2: Alex, Peter, and Zoe.
Grade 3…"
- "Let me think. We have
Anna, Barb, and Charlie in grade 1,
Alex, Peter, and Zoe in grade 2
and Jim in grade 5.
So the answer is: Anna, Barb, Charlie, Alex, Peter, Zoe and Jim"

Note that all our students only have one name. (It's a small town, what
do you want?)
Expand Down
2 changes: 1 addition & 1 deletion exercises/list-ops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In functional languages list operations like `length`, `map`, and
`reduce` are very common. Implement a series of basic list operations,
without using existing functions.

The precise number and names of the operations to be implemented will be
The precise number and names of the operations to be implemented will be
track dependent to avoid conflicts with existing names, but the general
operations you will implement include:

Expand Down
8 changes: 4 additions & 4 deletions exercises/luhn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ are disallowed.
## Example 1: valid credit card number

```text
4539 1488 0343 6467
4539 3195 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_
4_3_ 3_9_ 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
8569 6195 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
8+5+6+9+6+1+9+5+0+3+8+3+3+4+3+7 = 80
```

If the sum is evenly divisible by 10, then the number is valid. This number is valid!
Expand Down
2 changes: 1 addition & 1 deletion exercises/minesweeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In this exercise you have to create some code that counts the number of
mines adjacent to a given empty square and replaces that square with the
count.

The board is a rectangle composed of blank space (' ') characters. A mine
The board is a rectangle composed of blank space (' ') characters. A mine
is represented by an asterisk ('\*') character.

If a given space has no adjacent mines at all, leave that square blank.
Expand Down
2 changes: 1 addition & 1 deletion exercises/palindrome-products/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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 a range of numbers, find the largest and smallest palindromes which
are products of numbers within that range.
are products of two numbers within that range.

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
Expand Down
4 changes: 2 additions & 2 deletions exercises/perfect-numbers/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Perfect Numbers

Determine if a number is perfect, abundant, or deficient based on
Nicomachus' (60 - 120 CE) classification scheme for natural numbers.
Nicomachus' (60 - 120 CE) classification scheme for positive integers.

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
The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) devised a classification scheme for positive integers, 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
- 6 is a perfect number because (1 + 2 + 3) = 6
Expand Down
12 changes: 9 additions & 3 deletions exercises/resistor-color-duo/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Resistor Color Duo

If you want to build something using a Raspberry Pi, you'll probably use _resistors_. For this exercise, you need to know two things about them:
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
For this exercise, you need to know two things about them:

* Each resistor has a resistance value.
* Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values. Each band has a position and a numeric value. For example, if they printed a brown band (value 1) followed by a green band (value 5), it would translate to the number 15.

In this exercise you are going to create a helpful program so that you don't have to remember the values of the bands. The program will take color names as input and output a two digit number, even if the input is more than two colors!
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
Each band has a position and a numeric value.

The first 2 bands of a resistor have a simple encoding scheme: each color maps to a single number.
For example, if they printed a brown band (value 1) followed by a green band (value 5), it would translate to the number 15.

In this exercise you are going to create a helpful program so that you don't have to remember the values of the bands.
The program will take color names as input and output a two digit number, even if the input is more than two colors!

The band colors are encoded as follows:

Expand Down
2 changes: 1 addition & 1 deletion exercises/robot-name/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ one, head over there and create an issue. We'll do our best to help you!

## Source

A debugging session with Paul Blackwell at gSchool. [http://gschool.it](http://gschool.it)
A debugging session with Paul Blackwell at gSchool.

## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
2 changes: 1 addition & 1 deletion exercises/simple-cipher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ substitution cipher a little more fault tolerant by providing a source
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 alphanumeric characters in length.
at least 100 lowercase characters in length.

## Extensions

Expand Down
2 changes: 1 addition & 1 deletion exercises/simple-linked-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ one, head over there and create an issue. We'll do our best to help you!

## 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)
Inspired by 'Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby', singly linked-lists. [https://web.archive.org/web/20160731005714/http://brpreiss.com/books/opus8/html/page96.html](https://web.archive.org/web/20160731005714/http://brpreiss.com/books/opus8/html/page96.html)

## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

0 comments on commit ff84a7a

Please sign in to comment.