Skip to content

Commit eeb33dc

Browse files
authored
Update tests and documentation (#908)
Fixes #906
1 parent b2cb1d0 commit eeb33dc

File tree

13 files changed

+53
-39
lines changed

13 files changed

+53
-39
lines changed

exercises/practice/allergies/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
},
1919
"blurb": "Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.",
2020
"source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
21-
"source_url": "https://turing.edu"
21+
"source_url": "https://www.turing.edu/"
2222
}

exercises/practice/bob/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
},
1919
"blurb": "Bob is a lackadaisical teenager. In conversation, his responses are very limited.",
2020
"source": "Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial.",
21-
"source_url": "https://pine.fm/LearnToProgram/?Chapter=06"
21+
"source_url": "https://pine.fm/LearnToProgram/chap_06.html"
2222
}

exercises/practice/book-store/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
},
1919
"blurb": "To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts of multiple-book purchases.",
2020
"source": "Inspired by the harry potter kata from Cyber-Dojo.",
21-
"source_url": "https://cyber-dojo.org"
21+
"source_url": "https://cyber-dojo.org/creator/home"
2222
}

exercises/practice/etl/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
},
1919
"blurb": "Change the data format for scoring a game to more easily add other languages.",
2020
"source": "Based on an exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
21-
"source_url": "https://turing.edu"
21+
"source_url": "https://www.turing.edu/"
2222
}

exercises/practice/matrix/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
},
1919
"blurb": "Given a string representing a matrix of numbers, return the rows and columns of that matrix.",
2020
"source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
21-
"source_url": "https://turing.edu"
21+
"source_url": "https://www.turing.edu/"
2222
}
Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,52 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[163e8e86-7bfd-4ee2-bd68-d083dc3381a3]
6-
description = "Smallest perfect number is classified correctly"
13+
description = "Perfect numbers -> Smallest perfect number is classified correctly"
714

815
[169a7854-0431-4ae0-9815-c3b6d967436d]
9-
description = "Medium perfect number is classified correctly"
16+
description = "Perfect numbers -> Medium perfect number is classified correctly"
1017

1118
[ee3627c4-7b36-4245-ba7c-8727d585f402]
12-
description = "Large perfect number is classified correctly"
19+
description = "Perfect numbers -> Large perfect number is classified correctly"
1320

1421
[80ef7cf8-9ea8-49b9-8b2d-d9cb3db3ed7e]
15-
description = "Smallest abundant number is classified correctly"
22+
description = "Abundant numbers -> Smallest abundant number is classified correctly"
1623

1724
[3e300e0d-1a12-4f11-8c48-d1027165ab60]
18-
description = "Medium abundant number is classified correctly"
25+
description = "Abundant numbers -> Medium abundant number is classified correctly"
1926

2027
[ec7792e6-8786-449c-b005-ce6dd89a772b]
21-
description = "Large abundant number is classified correctly"
28+
description = "Abundant numbers -> Large abundant number is classified correctly"
29+
30+
[05f15b93-849c-45e9-9c7d-1ea131ef7d10]
31+
description = "Abundant numbers -> Perfect square abundant number is classified correctly"
2232

2333
[e610fdc7-2b6e-43c3-a51c-b70fb37413ba]
24-
description = "Smallest prime deficient number is classified correctly"
34+
description = "Deficient numbers -> Smallest prime deficient number is classified correctly"
2535

2636
[0beb7f66-753a-443f-8075-ad7fbd9018f3]
27-
description = "Smallest non-prime deficient number is classified correctly"
37+
description = "Deficient numbers -> Smallest non-prime deficient number is classified correctly"
2838

2939
[1c802e45-b4c6-4962-93d7-1cad245821ef]
30-
description = "Medium deficient number is classified correctly"
40+
description = "Deficient numbers -> Medium deficient number is classified correctly"
3141

3242
[47dd569f-9e5a-4a11-9a47-a4e91c8c28aa]
33-
description = "Large deficient number is classified correctly"
43+
description = "Deficient numbers -> Large deficient number is classified correctly"
3444

3545
[a696dec8-6147-4d68-afad-d38de5476a56]
36-
description = "Edge case (no factors other than itself) is classified correctly"
46+
description = "Deficient numbers -> Edge case (no factors other than itself) is classified correctly"
3747

3848
[72445cee-660c-4d75-8506-6c40089dc302]
39-
description = "Zero is rejected (as it is not a positive integer)"
49+
description = "Invalid inputs -> Zero is rejected (as it is not a positive integer)"
4050

4151
[2d72ce2c-6802-49ac-8ece-c790ba3dae13]
42-
description = "Negative integer is rejected (as it is not a positive integer)"
52+
description = "Invalid inputs -> Negative integer is rejected (as it is not a positive integer)"

exercises/practice/perfect-numbers/perfect-numbers-test.lisp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
(let ((number 33550336))
2828
(is (string= "perfect" (perfect-numbers:classify number)))))
2929

30+
(test perfect-square-abundant-number-is-classified-correctly
31+
(let ((number 196))
32+
(is (string= "abundant" (perfect-numbers:classify number)))))
33+
3034
(test smallest-abundant-number-is-classified-correctly
3135
(let ((number 12))
3236
(is (string= "abundant" (perfect-numbers:classify number)))))

exercises/practice/phone-number/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
},
1919
"blurb": "Clean up user-entered phone numbers so that they can be sent SMS messages.",
2020
"source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
21-
"source_url": "https://turing.edu"
21+
"source_url": "https://www.turing.edu/"
2222
}

exercises/practice/pig-latin/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
},
1919
"blurb": "Implement a program that translates from English to Pig Latin.",
2020
"source": "The Pig Latin exercise at Test First Teaching by Ultrasaurus",
21-
"source_url": "https://github.com/ultrasaurus/test-first-teaching/blob/master/learn_ruby/pig_latin/"
21+
"source_url": "https://github.com/ultrasaurus/test-first-teaching/tree/master/learn_ruby/pig_latin"
2222
}
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Instructions
22

33
Your task is to determine the degree of separation between two individuals in a family tree.
4+
This is similar to the pop culture idea that every Hollywood actor is [within six degrees of Kevin Bacon][six-bacons].
45

56
- You will be given an input, with all parent names and their children.
67
- Each name is unique, a child _can_ have one or two parents.
@@ -13,27 +14,26 @@ Your task is to determine the degree of separation between two individuals in a
1314
Given the following family tree:
1415

1516
```text
16-
┌──────────┐ ┌──────────┐ ┌───────────┐
17-
│ Helena │ │ Erdős │ │ Shusaku │
18-
└───┬───┬──┘ └─────┬────┘ └──────┬────┘
19-
┌───┘ └───────┐ └──────┬──────┘
20-
▼ ▼ ▼
21-
┌──────────┐ ┌────────┐ ┌──────────┐
22-
│ Isla │ │ Tariq │ │ Kevin │
23-
└────┬─────┘ └────┬───┘ └──────────┘
24-
▼ ▼
25-
┌─────────┐ ┌────────┐
17+
┌──────────┐ ┌──────────┐ ┌───────────┐
18+
│ Helena │ │ Erdős ├─────┤ Shusaku │
19+
└───┬───┬──┘ └─────┬────┘ └────┬──────┘
20+
┌───┘ └───────┐ └───────┬───────┘
21+
┌─────┴────┐ ┌────┴───┐ ┌─────┴────┐
22+
│ Isla ├─────┤ Tariq │ │ Kevin │
23+
└────┬─────┘ └────┬───┘ └──────────┘
24+
│ │
25+
┌────┴────┐ ┌────┴───┐
2626
│ Uma │ │ Morphy │
2727
└─────────┘ └────────┘
2828
```
2929

30-
The degree of separation between Tariq and Uma is 3 (Tariq → Helena → Isla → Uma).
31-
There's no known relationship between Isla and [Kevin][six-bacons], as there is no connection in the given data.
30+
The degree of separation between Tariq and Uma is 2 (Tariq → Isla → Uma).
31+
There's no known relationship between Isla and Kevin, as there is no connection in the given data.
3232
The degree of separation between Uma and Isla is 1.
3333

3434
~~~~exercism/note
3535
Isla and Tariq are siblings and have a separation of 1.
3636
Similarly, this implementation would report a separation of 2 from you to your father's brother.
3737
~~~~
3838

39-
[six-bacons]: https://en.m.wikipedia.org/wiki/Six_Degrees_of_Kevin_Bacon
39+
[six-bacons]: https://en.wikipedia.org/wiki/Six_Degrees_of_Kevin_Bacon

0 commit comments

Comments
 (0)