diff --git a/config.json b/config.json index e443f937..9f75f9c1 100644 --- a/config.json +++ b/config.json @@ -22,6 +22,7 @@ "slug": "hello-world", "name": "Hello World", "uuid": "83c215e6-4a4e-4302-8d68-47f367478d2c", + "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ @@ -32,6 +33,7 @@ "slug": "bob", "name": "Bob", "uuid": "e80b254a-0dd8-4efb-83e4-cee1cfc9431e", + "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ @@ -43,6 +45,7 @@ "slug": "sum-of-multiples", "name": "Sum Of Multiples", "uuid": "df4403d1-3fb2-4c2c-a228-2bdb442d0680", + "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ @@ -55,6 +58,7 @@ "slug": "raindrops", "name": "Raindrops", "uuid": "90a12652-946c-4771-83bd-741f884cd426", + "practices": [], "prerequisites": [], "difficulty": 2, "topics": [ @@ -66,6 +70,7 @@ "slug": "nucleotide-count", "name": "Nucleotide Count", "uuid": "68b0b096-c6c0-493f-9f7f-081a413d7078", + "practices": [], "prerequisites": [], "difficulty": 2, "topics": [ @@ -77,6 +82,7 @@ "slug": "hamming", "name": "Hamming", "uuid": "f55b2158-a8f0-4593-b44a-6e750ebac0a5", + "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ @@ -88,6 +94,7 @@ "slug": "leap", "name": "Leap", "uuid": "e62edbd6-861b-4cd6-bb03-6c9bcaa742a4", + "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ @@ -99,6 +106,7 @@ "slug": "reverse-string", "name": "Reverse String", "uuid": "925e73f0-28a9-4e33-937b-5f328ac50163", + "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ @@ -109,6 +117,7 @@ "slug": "two-fer", "name": "Two Fer", "uuid": "45f285c2-9358-451d-a931-1dee54df7b67", + "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ @@ -120,6 +129,7 @@ "slug": "grade-school", "name": "Grade School", "uuid": "2daa9e3e-65c1-4fc3-b6ee-6f477a198fec", + "practices": [], "prerequisites": [], "difficulty": 2, "topics": [ diff --git a/exercises/practice/bob/README.md b/exercises/practice/bob/.docs/instructions.md similarity index 51% rename from exercises/practice/bob/README.md rename to exercises/practice/bob/.docs/instructions.md index 10f5b7e7..edddb141 100644 --- a/exercises/practice/bob/README.md +++ b/exercises/practice/bob/.docs/instructions.md @@ -1,10 +1,10 @@ -# Bob +# Instructions Bob is a lackadaisical teenager. In conversation, his responses are very limited. -Bob answers 'Sure.' if you ask him a question. +Bob answers 'Sure.' if you ask him a question, such as "How are you?". -He answers 'Whoa, chill out!' if you yell at him. +He answers 'Whoa, chill out!' if you YELL AT HIM (in all capitals). He answers 'Calm down, I know what I'm doing!' if you yell a question at him. @@ -14,9 +14,3 @@ anything. He answers 'Whatever.' to anything else. Bob's conversational partner is a purist when it comes to written communication and always follows normal rules regarding sentence punctuation in English. -## 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) - -## 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/practice/bob/.meta/config.json b/exercises/practice/bob/.meta/config.json new file mode 100644 index 00000000..c98bfb89 --- /dev/null +++ b/exercises/practice/bob/.meta/config.json @@ -0,0 +1,10 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source": "Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial.", + "source_url": "http://pine.fm/LearnToProgram/?Chapter=06" +} diff --git a/exercises/practice/grade-school/.docs/instructions.md b/exercises/practice/grade-school/.docs/instructions.md new file mode 100644 index 00000000..8bbbf644 --- /dev/null +++ b/exercises/practice/grade-school/.docs/instructions.md @@ -0,0 +1,38 @@ +# Instructions + +Given students' names along with the grade that they are in, create a roster +for the school. + +In the end, you should be able to: + +- Add a student's name to the roster for a grade + - "Add Jim to grade 2." + - "OK." +- Get a list of all students enrolled in a grade + - "Which students are in grade 2?" + - "We've only got Jim just now." +- Get a sorted list of all students in all grades. Grades should sort + as 1, 2, 3, etc., and students within a grade should be sorted + alphabetically by name. + - "Who all is enrolled in school right now?" + - "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?) + +## For bonus points + +Did you get the tests passing and the code clean? If you want to, these +are some additional things you could try: + +- If you're working in a language with mutable data structures and your + implementation allows outside code to mutate the school's internal DB + directly, see if you can prevent this. Feel free to introduce additional + tests. + +Then please share your thoughts in a comment on the submission. Did this +experiment make the code better? Worse? Did you learn anything from it? diff --git a/exercises/practice/grade-school/.meta/config.json b/exercises/practice/grade-school/.meta/config.json new file mode 100644 index 00000000..1010ef16 --- /dev/null +++ b/exercises/practice/grade-school/.meta/config.json @@ -0,0 +1,10 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source": "A pairing session with Phil Battos at gSchool", + "source_url": "http://gschool.it" +} diff --git a/exercises/practice/grade-school/README.md b/exercises/practice/grade-school/README.md deleted file mode 100644 index 1f3b4ee9..00000000 --- a/exercises/practice/grade-school/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Grade-School - -Given students' names along with the grade that they are in, create a roster -for the school. - -In the end, you should be able to: - -- Add a student's name to the roster for a grade - - "Add Jim to grade 2." - - "OK." -- Get a list of all students enrolled in a grade - - "Which students are in grade 2?" - - "We've only got Jim just now." -- Get a sorted list of all students in all grades. Grades should sort - 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…" - -Note that all our students only have one name. (It's a small town, what -do you want?) - -## 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 diff --git a/exercises/practice/hamming/README.md b/exercises/practice/hamming/.docs/instructions.md similarity index 81% rename from exercises/practice/hamming/README.md rename to exercises/practice/hamming/.docs/instructions.md index 7c6dad63..56c5696d 100644 --- a/exercises/practice/hamming/README.md +++ b/exercises/practice/hamming/.docs/instructions.md @@ -1,4 +1,4 @@ -# Hamming +# Instructions Calculate the Hamming Distance between two DNA strands. @@ -22,9 +22,3 @@ The Hamming distance is only defined for sequences of equal length, so an attempt to calculate it between sequences of different lengths should not work. The general handling of this situation (e.g., raising an exception vs returning a special value) may differ between languages. -## Source - -The Calculating Point Mutations problem at Rosalind [http://rosalind.info/problems/hamm/](http://rosalind.info/problems/hamm/) - -## 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/practice/hamming/.meta/config.json b/exercises/practice/hamming/.meta/config.json new file mode 100644 index 00000000..77d306c1 --- /dev/null +++ b/exercises/practice/hamming/.meta/config.json @@ -0,0 +1,10 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source": "The Calculating Point Mutations problem at Rosalind", + "source_url": "http://rosalind.info/problems/hamm/" +} diff --git a/exercises/practice/hello-world/README.md b/exercises/practice/hello-world/.docs/instructions.md similarity index 60% rename from exercises/practice/hello-world/README.md rename to exercises/practice/hello-world/.docs/instructions.md index f2bc3ced..6e08ebba 100644 --- a/exercises/practice/hello-world/README.md +++ b/exercises/practice/hello-world/.docs/instructions.md @@ -1,4 +1,4 @@ -# Hello World +# Instructions The classical introductory exercise. Just say "Hello, World!". @@ -13,9 +13,3 @@ The objectives are simple: - Submit your solution and check it at the website. If everything goes well, you will be ready to fetch your first real exercise. -## 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) - -## 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/practice/hello-world/.meta/config.json b/exercises/practice/hello-world/.meta/config.json new file mode 100644 index 00000000..22d06720 --- /dev/null +++ b/exercises/practice/hello-world/.meta/config.json @@ -0,0 +1,10 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source": "This is an exercise to introduce users to using Exercism", + "source_url": "http://en.wikipedia.org/wiki/%22Hello,_world!%22_program" +} diff --git a/exercises/practice/leap/README.md b/exercises/practice/leap/.docs/instructions.md similarity index 61% rename from exercises/practice/leap/README.md rename to exercises/practice/leap/.docs/instructions.md index 4156da04..dc7b4e81 100644 --- a/exercises/practice/leap/README.md +++ b/exercises/practice/leap/.docs/instructions.md @@ -1,4 +1,4 @@ -# Leap +# Instructions Given a year, report if it is a leap year. @@ -13,9 +13,6 @@ on every year that is evenly divisible by 4 For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap year, but 2000 is. -If your language provides a method in the standard library that does -this look-up, pretend it doesn't exist and implement it yourself. - ## Notes Though our exercise adopts some very simple rules, there is more to @@ -25,9 +22,3 @@ For a delightful, four minute explanation of the whole leap year phenomenon, go watch [this youtube video][video]. [video]: http://www.youtube.com/watch?v=xX96xng7sAE -## Source - -JavaRanch Cattle Drive, exercise 3 [http://www.javaranch.com/leap.jsp](http://www.javaranch.com/leap.jsp) - -## 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/practice/leap/.meta/config.json b/exercises/practice/leap/.meta/config.json new file mode 100644 index 00000000..5d154693 --- /dev/null +++ b/exercises/practice/leap/.meta/config.json @@ -0,0 +1,10 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source": "JavaRanch Cattle Drive, exercise 3", + "source_url": "http://www.javaranch.com/leap.jsp" +} diff --git a/exercises/practice/nucleotide-count/.docs/instructions.md b/exercises/practice/nucleotide-count/.docs/instructions.md new file mode 100644 index 00000000..cd087589 --- /dev/null +++ b/exercises/practice/nucleotide-count/.docs/instructions.md @@ -0,0 +1,21 @@ +# Instructions + +Each of us inherits from our biological parents a set of chemical instructions known as DNA that influence how our bodies are constructed. All known life depends on DNA! + +> Note: You do not need to understand anything about nucleotides or DNA to complete this exercise. + +DNA is a long chain of other chemicals and the most important are the four nucleotides, adenine, cytosine, guanine and thymine. A single DNA chain can contain billions of these four nucleotides and the order in which they occur is important! +We call the order of these nucleotides in a bit of DNA a "DNA sequence". + +We represent a DNA sequence as an ordered collection of these four nucleotides and a common way to do that is with a string of characters such as "ATTACG" for a DNA sequence of 6 nucleotides. +'A' for adenine, 'C' for cytosine, 'G' for guanine, and 'T' for thymine. + +Given a string representing a DNA sequence, count how many of each nucleotide is present. +If the string contains characters that aren't A, C, G, or T then it is invalid and you should signal an error. + +For example: + +``` +"GATTACA" -> 'A': 3, 'C': 1, 'G': 1, 'T': 2 +"INVALID" -> error +``` diff --git a/exercises/practice/nucleotide-count/.meta/config.json b/exercises/practice/nucleotide-count/.meta/config.json new file mode 100644 index 00000000..c8d98cbd --- /dev/null +++ b/exercises/practice/nucleotide-count/.meta/config.json @@ -0,0 +1,10 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source": "The Calculating DNA Nucleotides_problem at Rosalind", + "source_url": "http://rosalind.info/problems/dna/" +} diff --git a/exercises/practice/nucleotide-count/README.md b/exercises/practice/nucleotide-count/README.md deleted file mode 100644 index 99ee13e3..00000000 --- a/exercises/practice/nucleotide-count/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Nucleotide Count - -Given a single stranded DNA string, compute how many times each nucleotide occurs in the string. - -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 as -- legos are to lego houses as -- words are to sentences as... -## Source - -The Calculating DNA Nucleotides_problem at Rosalind [http://rosalind.info/problems/dna/](http://rosalind.info/problems/dna/) - -## 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/practice/raindrops/.docs/instructions.md b/exercises/practice/raindrops/.docs/instructions.md new file mode 100644 index 00000000..a78585df --- /dev/null +++ b/exercises/practice/raindrops/.docs/instructions.md @@ -0,0 +1,16 @@ +# Instructions + +Your task is to convert a number into a string that contains raindrop sounds corresponding to certain potential factors. A factor is a number that evenly divides into another number, leaving no remainder. The simplest way to test if a one number is a factor of another is to use the [modulo operation](https://en.wikipedia.org/wiki/Modulo_operation). + +The rules of `raindrops` are that if a given number: + +- has 3 as a factor, add 'Pling' to the result. +- has 5 as a factor, add 'Plang' to the result. +- has 7 as a factor, add 'Plong' to the result. +- _does not_ have any of 3, 5, or 7 as a factor, the result should be the digits of the number. + +## Examples + +- 28 has 7 as a factor, but not 3 or 5, so the result would be "Plong". +- 30 has both 3 and 5 as factors, but not 7, so the result would be "PlingPlang". +- 34 is not factored by 3, 5, or 7, so the result would be "34". diff --git a/exercises/practice/raindrops/.meta/config.json b/exercises/practice/raindrops/.meta/config.json new file mode 100644 index 00000000..6e48df37 --- /dev/null +++ b/exercises/practice/raindrops/.meta/config.json @@ -0,0 +1,10 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source": "A variation on FizzBuzz, a famous technical interview question that is intended to weed out potential candidates. That question is itself derived from Fizz Buzz, a popular children's game for teaching division.", + "source_url": "https://en.wikipedia.org/wiki/Fizz_buzz" +} diff --git a/exercises/practice/raindrops/README.md b/exercises/practice/raindrops/README.md deleted file mode 100644 index 144ef696..00000000 --- a/exercises/practice/raindrops/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Raindrops - -Convert a number to a string, the contents of which depend on the number's factors. - -- If the number has 3 as a factor, output 'Pling'. -- If the number has 5 as a factor, output 'Plang'. -- If the number has 7 as a factor, output 'Plong'. -- If the number does not have 3, 5, or 7 as a factor, - just pass the number's digits straight through. - -## Examples - -- 28's factors are 1, 2, 4, **7**, 14, 28. - - In raindrop-speak, this would be a simple "Plong". -- 30's factors are 1, 2, **3**, **5**, 6, 10, 15, 30. - - In raindrop-speak, this would be a "PlingPlang". -- 34 has four factors: 1, 2, 17, and 34. - - In raindrop-speak, this would be "34". -## Source - -A variation on a famous interview question intended to weed out potential candidates. [http://jumpstartlab.com](http://jumpstartlab.com) - -## 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/practice/reverse-string/.docs/instructions.md b/exercises/practice/reverse-string/.docs/instructions.md new file mode 100644 index 00000000..039ee33a --- /dev/null +++ b/exercises/practice/reverse-string/.docs/instructions.md @@ -0,0 +1,7 @@ +# Instructions + +Reverse a string + +For example: +input: "cool" +output: "looc" diff --git a/exercises/practice/reverse-string/.meta/config.json b/exercises/practice/reverse-string/.meta/config.json new file mode 100644 index 00000000..f67413cd --- /dev/null +++ b/exercises/practice/reverse-string/.meta/config.json @@ -0,0 +1,10 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source": "Introductory challenge to reverse an input string", + "source_url": "https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb" +} diff --git a/exercises/practice/reverse-string/README.md b/exercises/practice/reverse-string/README.md deleted file mode 100644 index 44f8f9c0..00000000 --- a/exercises/practice/reverse-string/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Reverse String - -Reverse a string - -For example: -input: "cool" -output: "looc" -## 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/practice/sum-of-multiples/.docs/instructions.md b/exercises/practice/sum-of-multiples/.docs/instructions.md new file mode 100644 index 00000000..bb512396 --- /dev/null +++ b/exercises/practice/sum-of-multiples/.docs/instructions.md @@ -0,0 +1,9 @@ +# Instructions + +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 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. diff --git a/exercises/practice/sum-of-multiples/.meta/config.json b/exercises/practice/sum-of-multiples/.meta/config.json new file mode 100644 index 00000000..d864e2c5 --- /dev/null +++ b/exercises/practice/sum-of-multiples/.meta/config.json @@ -0,0 +1,10 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source": "A variation on Problem 1 at Project Euler", + "source_url": "http://projecteuler.net/problem=1" +} diff --git a/exercises/practice/sum-of-multiples/README.md b/exercises/practice/sum-of-multiples/README.md deleted file mode 100644 index 311e0af0..00000000 --- a/exercises/practice/sum-of-multiples/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Sum Of Multiples - -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 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. -## Source - -A variation on Problem 1 at Project Euler [http://projecteuler.net/problem=1](http://projecteuler.net/problem=1) - -## 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/practice/two-fer/.docs/instructions.md b/exercises/practice/two-fer/.docs/instructions.md new file mode 100644 index 00000000..f4853c54 --- /dev/null +++ b/exercises/practice/two-fer/.docs/instructions.md @@ -0,0 +1,26 @@ +# Instructions + +`Two-fer` or `2-fer` is short for two for one. One for you and one for me. + +Given a name, return a string with the message: + +```text +One for name, one for me. +``` + +Where "name" is the given name. + +However, if the name is missing, return the string: + +```text +One for you, one for me. +``` + +Here are some examples: + +|Name |String to return +|:-------|:------------------ +|Alice |One for Alice, one for me. +|Bob |One for Bob, one for me. +| |One for you, one for me. +|Zaphod |One for Zaphod, one for me. diff --git a/exercises/practice/two-fer/.meta/config.json b/exercises/practice/two-fer/.meta/config.json new file mode 100644 index 00000000..20830aed --- /dev/null +++ b/exercises/practice/two-fer/.meta/config.json @@ -0,0 +1,9 @@ +{ + "authors": [], + "files": { + "solution": [], + "test": [], + "example": [] + }, + "source_url": "https://github.com/exercism/problem-specifications/issues/757" +} diff --git a/exercises/practice/two-fer/README.md b/exercises/practice/two-fer/README.md deleted file mode 100644 index 00756dba..00000000 --- a/exercises/practice/two-fer/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Two Fer - -`Two-fer` or `2-fer` is short for two for one. One for you and one for me. - -Given a name, return a string with the message: - -```text -One for X, one for me. -``` - -Where X is the given name. - -However, if the name is missing, return the string: - -```text -One for you, one for me. -``` - -Here are some examples: - -|Name | String to return -|:------:|:-----------------: -|Alice | One for Alice, one for me. -|Bob | One for Bob, one for me. -| | One for you, one for me. -|Zaphod | One for Zaphod, one for me. -## Source - -[https://github.com/exercism/problem-specifications/issues/757](https://github.com/exercism/problem-specifications/issues/757) - -## Submitting Incomplete Solutions -It's possible to submit an incomplete solution so you can see how others have completed the exercise.