From d6b6cc35077af34a0b8316e37a0eed55695e355d Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Sun, 4 Feb 2018 11:03:26 -0700 Subject: [PATCH 1/4] bob: Lock description to match current test suite --- exercises/bob/.meta/description.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 exercises/bob/.meta/description.md diff --git a/exercises/bob/.meta/description.md b/exercises/bob/.meta/description.md new file mode 100644 index 00000000..1072139f --- /dev/null +++ b/exercises/bob/.meta/description.md @@ -0,0 +1,10 @@ +Bob is a lackadaisical teenager. In conversation, his responses are very limited. + +Bob answers 'Sure.' if you ask him a question. + +He answers 'Whoa, chill out!' if you yell at him. + +He says 'Fine. Be that way!' if you address him without actually saying +anything. + +He answers 'Whatever.' to anything else. From 2668f8a6fa6e20adde0b5946f9505599dc351e39 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Sun, 4 Feb 2018 11:07:11 -0700 Subject: [PATCH 2/4] Regenerate all exercise READMEs This updates all the exercise README files to match the latest problem descriptions. --- exercises/accumulate/README.md | 3 -- exercises/acronym/README.md | 1 - exercises/all-your-base/README.md | 41 +++++++++++----- exercises/allergies/README.md | 1 - exercises/atbash-cipher/README.md | 3 +- exercises/beer-song/README.md | 4 +- exercises/binary/README.md | 2 + exercises/book-store/README.md | 10 ++-- exercises/bowling/README.md | 26 +++++++--- exercises/change/README.md | 2 +- exercises/connect/README.md | 2 +- exercises/etl/README.md | 4 +- exercises/grade-school/README.md | 1 - exercises/grains/README.md | 1 - exercises/isogram/README.md | 3 +- exercises/leap/README.md | 2 +- exercises/luhn/README.md | 14 +++--- exercises/meetup/README.md | 51 +++++++++++++++----- exercises/nucleotide-count/README.md | 30 +++--------- exercises/ocr-numbers/README.md | 12 ++--- exercises/pangram/README.md | 2 +- exercises/pascals-triangle/README.md | 4 +- exercises/perfect-numbers/README.md | 4 +- exercises/phone-number/README.md | 7 +-- exercises/queen-attack/README.md | 2 +- exercises/rna-transcription/README.md | 2 +- exercises/roman-numerals/README.md | 2 +- exercises/run-length-encoding/README.md | 7 ++- exercises/scrabble-score/README.md | 4 +- exercises/series/README.md | 21 ++++++++ exercises/space-age/README.md | 2 +- exercises/sum-of-multiples/README.md | 9 ++-- exercises/triangle/README.md | 15 +++--- exercises/trinary/README.md | 2 +- exercises/variable-length-quantity/README.md | 13 +++-- exercises/word-count/README.md | 3 +- exercises/wordy/README.md | 5 -- 37 files changed, 191 insertions(+), 126 deletions(-) diff --git a/exercises/accumulate/README.md b/exercises/accumulate/README.md index 70336882..983a50f7 100644 --- a/exercises/accumulate/README.md +++ b/exercises/accumulate/README.md @@ -25,9 +25,6 @@ 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. - ## Making the Test Suite Pass 1. Get [PHPUnit]. diff --git a/exercises/acronym/README.md b/exercises/acronym/README.md index 46463f7c..e1ff6d51 100644 --- a/exercises/acronym/README.md +++ b/exercises/acronym/README.md @@ -7,7 +7,6 @@ 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). - ## Making the Test Suite Pass 1. Get [PHPUnit]. diff --git a/exercises/all-your-base/README.md b/exercises/all-your-base/README.md index 30c342ad..660509b5 100644 --- a/exercises/all-your-base/README.md +++ b/exercises/all-your-base/README.md @@ -1,3 +1,5 @@ +# All Your Base + Convert a number, represented as a sequence of digits in one base, to any other base. Implement general base conversion. Given a number in base **a**, @@ -8,24 +10,41 @@ represented as a sequence of digits, convert it to base **b**. - Try to implement the conversion yourself. Do not use something else to perform the conversion for you. - ## About [Positional Notation](https://en.wikipedia.org/wiki/Positional_notation) +## About [Positional Notation](https://en.wikipedia.org/wiki/Positional_notation) + +In positional notation, a number in base **b** can be understood as a linear +combination of powers of **b**. + +The number 42, *in base 10*, means: + +(4 * 10^1) + (2 * 10^0) + +The number 101010, *in base 2*, means: + +(1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0) + +The number 1120, *in base 3*, means: + +(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0) + +I think you got the idea! - In positional notation, a number in base **b** can be understood as a linear - combination of powers of **b**. +*Yes. Those three numbers above are exactly the same. Congratulations!* - The number 42, *in base 10*, means: +## Making the Test Suite Pass - (4 * 10^1) + (2 * 10^0) +1. Get [PHPUnit]. - The number 101010, *in base 2*, means: + % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar + % chmod +x phpunit.phar - (1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0) +2. Execute the tests for an assignment. - The number 1120, *in base 3*, means: + % phpunit.phar wordy/wordy_test.php - (1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0) +[PHPUnit]: http://phpunit.de - I think you got the idea! - *Yes. Those three numbers above are exactly the same. Congratulations!* +## 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/allergies/README.md b/exercises/allergies/README.md index 6d185884..709d8246 100644 --- a/exercises/allergies/README.md +++ b/exercises/allergies/README.md @@ -29,7 +29,6 @@ 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. - ## Making the Test Suite Pass 1. Get [PHPUnit]. diff --git a/exercises/atbash-cipher/README.md b/exercises/atbash-cipher/README.md index 08932c28..8aebe5a8 100644 --- a/exercises/atbash-cipher/README.md +++ b/exercises/atbash-cipher/README.md @@ -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 ``` @@ -23,6 +23,7 @@ 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` diff --git a/exercises/beer-song/README.md b/exercises/beer-song/README.md index 54315d1e..623a2192 100644 --- a/exercises/beer-song/README.md +++ b/exercises/beer-song/README.md @@ -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. diff --git a/exercises/binary/README.md b/exercises/binary/README.md index 41206bba..d0ee5a4a 100644 --- a/exercises/binary/README.md +++ b/exercises/binary/README.md @@ -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 diff --git a/exercises/book-store/README.md b/exercises/book-store/README.md index 1d7590c2..2324c2f3 100644 --- a/exercises/book-store/README.md +++ b/exercises/book-store/README.md @@ -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 @@ -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) diff --git a/exercises/bowling/README.md b/exercises/bowling/README.md index e72afee7..cfda4ca3 100644 --- a/exercises/bowling/README.md +++ b/exercises/bowling/README.md @@ -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: @@ -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. diff --git a/exercises/change/README.md b/exercises/change/README.md index c0c42628..40bfd016 100644 --- a/exercises/change/README.md +++ b/exercises/change/README.md @@ -32,7 +32,7 @@ that the sum of the coins' value would equal the correct amount of change. ## Source -Software Craftsmanship - Kata-logue [http://craftsmanship.sv.cmu.edu/exercises/coin-change-kata](http://craftsmanship.sv.cmu.edu/exercises/coin-change-kata) +Software Craftsmanship - Coin Change Kata [https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata](https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata) ## 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/connect/README.md b/exercises/connect/README.md index 677a8761..44b2f8df 100644 --- a/exercises/connect/README.md +++ b/exercises/connect/README.md @@ -18,7 +18,7 @@ computes the winner (or lack thereof). Note that all games need not be "fair". The boards look like this (with spaces added for readability, which won't be in the representation passed to your code): -``` +```text . O . X . . X X O . O O O X . diff --git a/exercises/etl/README.md b/exercises/etl/README.md index b0d4701c..8ae5d5e5 100644 --- a/exercises/etl/README.md +++ b/exercises/etl/README.md @@ -1,8 +1,9 @@ -# Etl +# ETL We are going to do the `Transform` step of an Extract-Transform-Load. ### ETL + Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so we're going to migrate this." @@ -11,6 +12,7 @@ once." That's then typically followed by much forehead slapping and moaning about how stupid we could possibly be.) ### The goal + We're going to extract some scrabble scores from a legacy system. The old system stored a list of letters per score: diff --git a/exercises/grade-school/README.md b/exercises/grade-school/README.md index 1c1b27d8..b4f14fc0 100644 --- a/exercises/grade-school/README.md +++ b/exercises/grade-school/README.md @@ -21,7 +21,6 @@ In the end, you should be able to: 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 diff --git a/exercises/grains/README.md b/exercises/grains/README.md index 47fa0e73..8163bbdf 100644 --- a/exercises/grains/README.md +++ b/exercises/grains/README.md @@ -15,7 +15,6 @@ Write code that shows: - how many grains were on each square, and - the total number of grains - ## For bonus points Did you get the tests passing and the code clean? If you want to, these diff --git a/exercises/isogram/README.md b/exercises/isogram/README.md index 8d4e81df..8231543b 100644 --- a/exercises/isogram/README.md +++ b/exercises/isogram/README.md @@ -2,13 +2,14 @@ Determine if a word or phrase is an isogram. -An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter. +An isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times. Examples of isograms: - lumberjacks - background - downstream +- six-year-old The word *isograms*, however, is not an isogram, because the s repeats. diff --git a/exercises/leap/README.md b/exercises/leap/README.md index 7c33a9ba..794aded7 100644 --- a/exercises/leap/README.md +++ b/exercises/leap/README.md @@ -4,7 +4,7 @@ Given a year, report if it is a leap year. The tricky thing here is that a leap year in the Gregorian calendar occurs: -```plain +```text on every year that is evenly divisible by 4 except every year that is evenly divisible by 100 unless the year is also evenly divisible by 400 diff --git a/exercises/luhn/README.md b/exercises/luhn/README.md index 32297281..06c19735 100644 --- a/exercises/luhn/README.md +++ b/exercises/luhn/README.md @@ -18,27 +18,27 @@ are disallowed. ## Example 1: valid credit card number -``` +```text 4539 1488 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_ ``` 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 ``` Then sum all of the digits: -``` +```text 8+5+6+9+2+4+7+8+0+3+8+3+3+4+3+7 = 80 ``` @@ -46,19 +46,19 @@ If the sum is evenly divisible by 10, then the number is valid. This number is v ## Example 2: invalid credit card number -``` +```text 8273 1232 7352 0569 ``` Double the second digits, starting from the right -``` +```text 7253 2262 5312 0539 ``` Sum the digits -``` +```text 7+2+5+3+2+2+6+2+5+3+1+2+0+5+3+9 = 57 ``` diff --git a/exercises/meetup/README.md b/exercises/meetup/README.md index 4524faf3..9e9d639c 100644 --- a/exercises/meetup/README.md +++ b/exercises/meetup/README.md @@ -1,21 +1,48 @@ +# Meetup + Calculate the date of meetups. -Typically meetups happen on the same day of the week. In this exercise, you will take -a description of a meetup date, and return the actual meetup date. +Typically meetups happen on the same day of the week. In this exercise, you +will take a description of a meetup date, and return the actual meetup date. Examples of general descriptions are: -- the first Monday of January 2017 -- the third Tuesday of January 2017 -- the Wednesteenth of January 2017 -- the last Thursday of January 2017 +- The first Monday of January 2017 +- The third Tuesday of January 2017 +- The wednesteenth of January 2017 +- The last Thursday of January 2017 + +The descriptors you are expected to parse are: +first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth, +thursteenth, friteenth, saturteenth, sunteenth -Note that "Monteenth", "Tuesteenth", etc are all made up words. There -was a meetup whose members realized that there are exactly 7 numbered days in a month that -end in '-teenth'. Therefore, one is guaranteed that each day of the week +Note that "monteenth", "tuesteenth", etc are all made up words. There was a +meetup whose members realized that there are exactly 7 numbered days in a month +that end in '-teenth'. Therefore, one is guaranteed that each day of the week (Monday, Tuesday, ...) will have exactly one date that is named with '-teenth' in every month. -Given examples of a meetup dates, each containing a month, day, year, and descriptor -(first, second, teenth, etc), calculate the date of the actual meetup. -For example, if given "First Monday of January 2017", the correct meetup date is 2017/1/2 +Given examples of a meetup dates, each containing a month, day, year, and +descriptor calculate the date of the actual meetup. For example, if given +"The first Monday of January 2017", the correct meetup date is 2017/1/2. + +## Making the Test Suite Pass + +1. Get [PHPUnit]. + + % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar + % chmod +x phpunit.phar + +2. Execute the tests for an assignment. + + % phpunit.phar wordy/wordy_test.php + +[PHPUnit]: http://phpunit.de + + +## Source + +Jeremy Hinegardner mentioned a Boulder meetup that happens on the Wednesteenth of every month [https://twitter.com/copiousfreetime](https://twitter.com/copiousfreetime) + +## 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/nucleotide-count/README.md b/exercises/nucleotide-count/README.md index 4c117b3f..22ee8ac4 100644 --- a/exercises/nucleotide-count/README.md +++ b/exercises/nucleotide-count/README.md @@ -1,30 +1,16 @@ # Nucleotide Count -Given a DNA string, compute how many times each nucleotide occurs in the string. +Given a single stranded DNA string, compute how many times each nucleotide occurs in the string. -DNA is represented by an alphabet of the following symbols: 'A', 'C', -'G', and 'T'. - -Each symbol represents a nucleotide, which is a fancy name for the -particular molecules that happen to make up a large part of DNA. - -Shortest intro to biochemistry EVAR: +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 and RNA as -- amino acids are to proteins as -- sugar is to starch as -- oh crap lipids - -I'm not going to talk about lipids because they're crazy complex. - -So back to nucleotides. - -DNA contains four types of them: adenine (`A`), cytosine (`C`), guanine -(`G`), and thymine (`T`). - -RNA contains a slightly different set of nucleotides, but we don't care -about that for now. +- nucleotides are to DNA as +- legos are to lego houses as +- words are to sentences as... ## Making the Test Suite Pass diff --git a/exercises/ocr-numbers/README.md b/exercises/ocr-numbers/README.md index 49f91863..8a6509c3 100644 --- a/exercises/ocr-numbers/README.md +++ b/exercises/ocr-numbers/README.md @@ -1,4 +1,4 @@ -# Ocr Numbers +# OCR Numbers Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled. @@ -9,7 +9,7 @@ To begin with, convert a simple binary font to a string containing 0 or 1. The binary font uses pipes and underscores, four rows high and three columns wide. -``` +```text _ # | | # zero. |_| # @@ -18,7 +18,7 @@ The binary font uses pipes and underscores, four rows high and three columns wid Is converted to "0" -``` +```text # | # one. | # @@ -39,7 +39,7 @@ Update your program to recognize multi-character binary strings, replacing garbl Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string. -``` +```text _ _| |_ @@ -48,7 +48,7 @@ Update your program to recognize all numbers 0 through 9, both individually and Is converted to "2" -``` +```text _ _ _ _ _ _ _ _ # | _| _||_||_ |_ ||_||_|| | # decimal numbers. ||_ _| | _||_| ||_| _||_| # @@ -61,7 +61,7 @@ Is converted to "1234567890" Update your program to handle multiple numbers, one per line. When converting several lines, join the lines with commas. -``` +```text _ _ | _| _| ||_ _| diff --git a/exercises/pangram/README.md b/exercises/pangram/README.md index b6a24102..7fbe1edc 100644 --- a/exercises/pangram/README.md +++ b/exercises/pangram/README.md @@ -2,7 +2,7 @@ Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma, "every letter") is a sentence using every letter of the alphabet at least once. -The best known English pangram is: +The best known English pangram is: > The quick brown fox jumps over the lazy dog. The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case diff --git a/exercises/pascals-triangle/README.md b/exercises/pascals-triangle/README.md index 392c2a05..11facfae 100644 --- a/exercises/pascals-triangle/README.md +++ b/exercises/pascals-triangle/README.md @@ -1,11 +1,11 @@ -# Pascals Triangle +# Pascal's Triangle Compute Pascal's triangle up to a given number of rows. In Pascal's Triangle each number is computed by adding the numbers to the right and left of the current position in the previous row. -```plain +```text 1 1 1 1 2 1 diff --git a/exercises/perfect-numbers/README.md b/exercises/perfect-numbers/README.md index d5d961cc..812a57bc 100644 --- a/exercises/perfect-numbers/README.md +++ b/exercises/perfect-numbers/README.md @@ -5,7 +5,7 @@ Nicomachus' (60 - 120 CE) classification scheme for natural numbers. 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 -- **Perfect**: aliquot sum = number +- **Perfect**: aliquot sum = number - 6 is a perfect number because (1 + 2 + 3) = 6 - 28 is a perfect number because (1 + 2 + 4 + 7 + 14) = 28 - **Abundant**: aliquot sum > number @@ -14,7 +14,7 @@ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) d - **Deficient**: aliquot sum < number - 8 is a deficient number because (1 + 2 + 4) = 7 - Prime numbers are deficient - + Implement a way to determine whether a given number is **perfect**. Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**. ## Making the Test Suite Pass diff --git a/exercises/phone-number/README.md b/exercises/phone-number/README.md index 44ba5b7a..7af44158 100644 --- a/exercises/phone-number/README.md +++ b/exercises/phone-number/README.md @@ -6,14 +6,15 @@ The **North American Numbering Plan (NANP)** is a telephone numbering system use NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as *area code*, followed by a seven-digit local number. The first three digits of the local number represent the *exchange code*, followed by the unique four-digit number which is the *subscriber number*. - The format is usually represented as -``` + +```text (NXX)-NXX-XXXX ``` + where `N` is any digit from 2 through 9 and `X` is any digit from 0 through 9. -Your task is to clean up differently formated telephone numbers by removing punctuation and the country code (1) if present. +Your task is to clean up differently formatted telephone numbers by removing punctuation and the country code (1) if present. For example, the inputs - `+1 (613)-995-0253` diff --git a/exercises/queen-attack/README.md b/exercises/queen-attack/README.md index 3a3038c0..91763ec8 100644 --- a/exercises/queen-attack/README.md +++ b/exercises/queen-attack/README.md @@ -11,7 +11,7 @@ A chessboard can be represented by an 8 by 8 array. So if you're told the white queen is at (2, 3) and the black queen at (5, 6), then you'd know you've got a set-up like so: -```plain +```text _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ W _ _ _ _ diff --git a/exercises/rna-transcription/README.md b/exercises/rna-transcription/README.md index c0a4e8ee..24b4bcee 100644 --- a/exercises/rna-transcription/README.md +++ b/exercises/rna-transcription/README.md @@ -1,4 +1,4 @@ -# Rna Transcription +# RNA Transcription Given a DNA strand, return its RNA complement (per RNA transcription). diff --git a/exercises/roman-numerals/README.md b/exercises/roman-numerals/README.md index ad84d20b..875adf0d 100644 --- a/exercises/roman-numerals/README.md +++ b/exercises/roman-numerals/README.md @@ -14,7 +14,7 @@ The Romans wrote numbers using letters - I, V, X, L, C, D, M. (notice these letters have lots of straight lines and are hence easy to hack into stone tablets). -``` +```text 1 => I 10 => X 7 => VII diff --git a/exercises/run-length-encoding/README.md b/exercises/run-length-encoding/README.md index dcfdc285..abe272e0 100644 --- a/exercises/run-length-encoding/README.md +++ b/exercises/run-length-encoding/README.md @@ -23,7 +23,7 @@ the letters A through Z (either lower or upper case) and whitespace. This way data to be encoded will never contain any numbers and numbers inside data to be decoded always represent the count for the following character. -## Submitting Exercises +## Making the Test Suite Pass 1. Get [PHPUnit]. @@ -32,7 +32,10 @@ be decoded always represent the count for the following character. 2. Execute the tests for an assignment. - % phpunit.phar run-length-encoding/run-length-encoding_test.php + % phpunit.phar wordy/wordy_test.php + +[PHPUnit]: http://phpunit.de + ## Source diff --git a/exercises/scrabble-score/README.md b/exercises/scrabble-score/README.md index 8d282038..2db7be38 100644 --- a/exercises/scrabble-score/README.md +++ b/exercises/scrabble-score/README.md @@ -6,7 +6,7 @@ Given a word, compute the scrabble score for that word. You'll need these: -```plain +```text Letter Value A, E, I, O, U, L, N, R, S, T 1 D, G 2 @@ -18,6 +18,7 @@ Q, Z 10 ``` ## Examples + "cabbage" should be scored as worth 14 points: - 3 points for C @@ -34,6 +35,7 @@ And to total: - = 14 ## Extensions + - You can play a double or a triple letter. - You can play a double or a triple word. diff --git a/exercises/series/README.md b/exercises/series/README.md index 9d214623..7a0cd98e 100644 --- a/exercises/series/README.md +++ b/exercises/series/README.md @@ -19,3 +19,24 @@ whatever you get. Note that these series are only required to occupy *adjacent positions* in the input; the digits need not be *numerically consecutive*. + +## Making the Test Suite Pass + +1. Get [PHPUnit]. + + % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar + % chmod +x phpunit.phar + +2. Execute the tests for an assignment. + + % phpunit.phar wordy/wordy_test.php + +[PHPUnit]: http://phpunit.de + + +## Source + +A subset of the Problem 8 at Project Euler [http://projecteuler.net/problem=8](http://projecteuler.net/problem=8) + +## 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/space-age/README.md b/exercises/space-age/README.md index b1c66443..22a3327d 100644 --- a/exercises/space-age/README.md +++ b/exercises/space-age/README.md @@ -12,7 +12,7 @@ Given an age in seconds, calculate how old someone would be on: - Neptune: orbital period 164.79132 Earth years So if you were told someone were 1,000,000,000 seconds old, you should -be able to say that they're 31 Earth-years old. +be able to say that they're 31.69 Earth-years old. If you're wondering why Pluto didn't make the cut, go watch [this youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs). diff --git a/exercises/sum-of-multiples/README.md b/exercises/sum-of-multiples/README.md index 7b352ea5..14aced7c 100644 --- a/exercises/sum-of-multiples/README.md +++ b/exercises/sum-of-multiples/README.md @@ -1,16 +1,13 @@ # Sum Of Multiples -Given a number, find the sum of all the multiples of particular numbers up to +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 up to but not including 20 that are -multiples of either 3 or 5, we get 3, 5, 6 and 9, 10, 12, 15, and 18. +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. -Given a number, find the sum of the multiples of a given set of numbers, -up to but not including that number. - ## Making the Test Suite Pass 1. Get [PHPUnit]. diff --git a/exercises/triangle/README.md b/exercises/triangle/README.md index f9b50671..6579c9d0 100644 --- a/exercises/triangle/README.md +++ b/exercises/triangle/README.md @@ -2,23 +2,26 @@ Determine if a triangle is equilateral, isosceles, or scalene. -An _equilateral_ triangle has all three sides the same length.
+An _equilateral_ triangle has all three sides the same length. + An _isosceles_ triangle has at least two sides the same length. (It is sometimes specified as having exactly two sides the same length, but for the purposes of -this exercise we'll say at least two.)
+this exercise we'll say at least two.) + A _scalene_ triangle has all sides of different lengths. ## Note -For a shape to be a triangle at all, all sides have to be of length > 0, and -the sum of the lengths of any two sides must be greater than or equal to the +For a shape to be a triangle at all, all sides have to be of length > 0, and +the sum of the lengths of any two sides must be greater than or equal to the length of the third side. See [Triangle Inequality](https://en.wikipedia.org/wiki/Triangle_inequality). ## Dig Deeper -The case where the sum of the lengths of two sides _equals_ that of the -third is known as a _degenerate_ triangle - it has zero area and looks like +The case where the sum of the lengths of two sides _equals_ that of the +third is known as a _degenerate_ triangle - it has zero area and looks like a single line. Feel free to add your own code/tests to check for degenerate triangles. + ## Making the Test Suite Pass 1. Get [PHPUnit]. diff --git a/exercises/trinary/README.md b/exercises/trinary/README.md index d3eda419..21c00d2e 100644 --- a/exercises/trinary/README.md +++ b/exercises/trinary/README.md @@ -11,7 +11,7 @@ Trinary numbers contain three symbols: 0, 1, and 2. The last place in a trinary number is the 1's place. The second to last is the 3's place, the third to last is the 9's place, etc. -```bash +```shell # "102012" 1 0 2 0 1 2 # the number 1*3^5 + 0*3^4 + 2*3^3 + 0*3^2 + 1*3^1 + 2*3^0 # the value diff --git a/exercises/variable-length-quantity/README.md b/exercises/variable-length-quantity/README.md index 9d416c88..f97774c0 100644 --- a/exercises/variable-length-quantity/README.md +++ b/exercises/variable-length-quantity/README.md @@ -5,18 +5,17 @@ Implement variable length quantity encoding and decoding. The goal of this exercise is to implement [VLQ](https://en.wikipedia.org/wiki/Variable-length_quantity) encoding/decoding. In short, the goal of this encoding is to encode integer values in a way that would save bytes. -Only the first 7 bits of each byte is significant (right-justified; sort of like an ASCII byte). -So, if you have a 32-bit value, you have to unpack it into a series of 7-bit bytes. -Of course, you will have a variable number of bytes depending upon your integer. +Only the first 7 bits of each byte is significant (right-justified; sort of like an ASCII byte). +So, if you have a 32-bit value, you have to unpack it into a series of 7-bit bytes. +Of course, you will have a variable number of bytes depending upon your integer. To indicate which is the last byte of the series, you leave bit #7 clear. -In all of the preceding bytes, you set bit #7. +In all of the preceding bytes, you set bit #7. -So, if an integer is between `0-127`, it can be represented as one byte. +So, if an integer is between `0-127`, it can be represented as one byte. Although VLQ can deal with numbers of arbitrary sizes, for this exercise we will restrict ourselves to only numbers that fit in a 32-bit unsigned integer. Here are examples of integers as 32-bit values, and the variable length quantities that they translate to: - -``` +```text NUMBER VARIABLE QUANTITY 00000000 00 00000040 40 diff --git a/exercises/word-count/README.md b/exercises/word-count/README.md index ae76d3fa..bae75ae8 100644 --- a/exercises/word-count/README.md +++ b/exercises/word-count/README.md @@ -4,14 +4,13 @@ Given a phrase, count the occurrences of each word in that phrase. For example for the input `"olly olly in come free"` -```plain +```text olly: 2 in: 1 come: 1 free: 1 ``` - ## Making the Test Suite Pass 1. Get [PHPUnit]. diff --git a/exercises/wordy/README.md b/exercises/wordy/README.md index cfc4c393..48ffe7e3 100644 --- a/exercises/wordy/README.md +++ b/exercises/wordy/README.md @@ -2,7 +2,6 @@ Parse and evaluate simple math word problems returning the answer as an integer. - ## Iteration 1 — Addition Add two numbers together. @@ -13,7 +12,6 @@ Evaluates to 18. Handle large numbers and negative numbers. - ## Iteration 2 — Subtraction, Multiplication and Division Now, perform the other three operations. @@ -30,7 +28,6 @@ Now, perform the other three operations. 5 - ## Iteration 3 — Multiple Operations Handle a set of operations, in sequence. @@ -46,7 +43,6 @@ left-to-right, _ignoring the typical order of operations._ 15 (i.e. not 9) - ## Bonus — Exponentials If you'd like, handle exponentials. @@ -55,7 +51,6 @@ If you'd like, handle exponentials. 32 - ## Making the Test Suite Pass 1. Get [PHPUnit]. From cf5fe52c6a78df96fadd01c1bdcd608c53d9acd5 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Sun, 4 Feb 2018 11:11:50 -0700 Subject: [PATCH 3/4] Rewrite the exercise README insert within the template This tweaks the instructions a bit, first to clarify that the instructions are relative to the PHP exercism workspace locally, and second to generate a phpunit command that uses the actual path to the exercise test file rather than always using Wordy as an example. --- config/exercise_readme.go.tmpl | 24 ++++++++++++++++++++---- docs/EXERCISE_README_INSERT.md | 13 ------------- 2 files changed, 20 insertions(+), 17 deletions(-) delete mode 100644 docs/EXERCISE_README_INSERT.md diff --git a/config/exercise_readme.go.tmpl b/config/exercise_readme.go.tmpl index 2b26f494..7c80a675 100644 --- a/config/exercise_readme.go.tmpl +++ b/config/exercise_readme.go.tmpl @@ -4,10 +4,26 @@ {{- with .Hints }} {{ . }} {{ end }} -{{- with .TrackInsert }} -{{ . }} -{{ end }} -{{- with .Spec.Credits -}} + +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. + + % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar + % chmod +x phpunit.phar + +2. Execute the tests: + + % ./phpunit.phar {{ .Spec.Slug }}/{{ .Spec.Slug }}_test.php + +[PHPUnit]: http://phpunit.de + +{{ with .Spec.Credits }} ## Source {{ . }} diff --git a/docs/EXERCISE_README_INSERT.md b/docs/EXERCISE_README_INSERT.md deleted file mode 100644 index a68fc035..00000000 --- a/docs/EXERCISE_README_INSERT.md +++ /dev/null @@ -1,13 +0,0 @@ -## Making the Test Suite Pass - -1. Get [PHPUnit]. - - % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar - % chmod +x phpunit.phar - -2. Execute the tests for an assignment. - - % phpunit.phar wordy/wordy_test.php - -[PHPUnit]: http://phpunit.de - From 3385c9efa6ca92621d740ca77ef415745a32d43a Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Sun, 4 Feb 2018 11:12:54 -0700 Subject: [PATCH 4/4] Regenerate the exercises to use the new test instructions --- exercises/accumulate/README.md | 14 ++++++++++---- exercises/acronym/README.md | 14 ++++++++++---- exercises/all-your-base/README.md | 15 ++++++++++----- exercises/allergies/README.md | 14 ++++++++++---- exercises/anagram/README.md | 14 ++++++++++---- exercises/atbash-cipher/README.md | 14 ++++++++++---- exercises/beer-song/README.md | 14 ++++++++++---- exercises/binary-search/README.md | 14 ++++++++++---- exercises/binary/README.md | 14 ++++++++++---- exercises/bob/README.md | 14 ++++++++++---- exercises/book-store/README.md | 14 ++++++++++---- exercises/bowling/README.md | 14 ++++++++++---- exercises/bracket-push/README.md | 14 ++++++++++---- exercises/change/README.md | 14 ++++++++++---- exercises/clock/README.md | 14 ++++++++++---- exercises/collatz-conjecture/README.md | 14 ++++++++++---- exercises/connect/README.md | 15 ++++++++++----- exercises/crypto-square/README.md | 14 ++++++++++---- exercises/difference-of-squares/README.md | 14 ++++++++++---- exercises/etl/README.md | 14 ++++++++++---- exercises/flatten-array/README.md | 14 ++++++++++---- exercises/gigasecond/README.md | 14 ++++++++++---- exercises/grade-school/README.md | 14 ++++++++++---- exercises/grains/README.md | 14 ++++++++++---- exercises/hamming/README.md | 14 ++++++++++---- exercises/hello-world/README.md | 14 ++++++++++---- exercises/isogram/README.md | 14 ++++++++++---- exercises/largest-series-product/README.md | 14 ++++++++++---- exercises/leap/README.md | 14 ++++++++++---- exercises/luhn/README.md | 14 ++++++++++---- exercises/markdown/README.md | 15 ++++++++++----- exercises/meetup/README.md | 14 ++++++++++---- exercises/minesweeper/README.md | 15 ++++++++++----- exercises/nth-prime/README.md | 14 ++++++++++---- exercises/nucleotide-count/README.md | 14 ++++++++++---- exercises/ocr-numbers/README.md | 14 ++++++++++---- exercises/pangram/README.md | 14 ++++++++++---- exercises/pascals-triangle/README.md | 14 ++++++++++---- exercises/perfect-numbers/README.md | 14 ++++++++++---- exercises/phone-number/README.md | 14 ++++++++++---- exercises/pig-latin/README.md | 14 ++++++++++---- exercises/prime-factors/README.md | 14 ++++++++++---- exercises/queen-attack/README.md | 14 ++++++++++---- exercises/rail-fence-cipher/README.md | 14 ++++++++++---- exercises/raindrops/README.md | 14 ++++++++++---- exercises/rna-transcription/README.md | 14 ++++++++++---- exercises/robot-name/README.md | 14 ++++++++++---- exercises/robot-simulator/README.md | 14 ++++++++++---- exercises/roman-numerals/README.md | 14 ++++++++++---- exercises/run-length-encoding/README.md | 14 ++++++++++---- exercises/scrabble-score/README.md | 14 ++++++++++---- exercises/series/README.md | 14 ++++++++++---- exercises/sieve/README.md | 14 ++++++++++---- exercises/space-age/README.md | 14 ++++++++++---- exercises/sum-of-multiples/README.md | 14 ++++++++++---- exercises/transpose/README.md | 14 ++++++++++---- exercises/triangle/README.md | 14 ++++++++++---- exercises/trinary/README.md | 14 ++++++++++---- exercises/variable-length-quantity/README.md | 14 ++++++++++---- exercises/word-count/README.md | 14 ++++++++++---- exercises/wordy/README.md | 14 ++++++++++---- 61 files changed, 610 insertions(+), 248 deletions(-) diff --git a/exercises/accumulate/README.md b/exercises/accumulate/README.md index 983a50f7..e49965ba 100644 --- a/exercises/accumulate/README.md +++ b/exercises/accumulate/README.md @@ -25,16 +25,22 @@ Keep your hands off that collect/map/fmap/whatchamacallit functionality provided by your standard library! Solve this one yourself using other basic tools instead. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar accumulate/accumulate_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/acronym/README.md b/exercises/acronym/README.md index e1ff6d51..e278cc64 100644 --- a/exercises/acronym/README.md +++ b/exercises/acronym/README.md @@ -7,16 +7,22 @@ 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). -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar acronym/acronym_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/all-your-base/README.md b/exercises/all-your-base/README.md index 660509b5..a7d4ebb6 100644 --- a/exercises/all-your-base/README.md +++ b/exercises/all-your-base/README.md @@ -31,20 +31,25 @@ I think you got the idea! *Yes. Those three numbers above are exactly the same. Congratulations!* -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar all-your-base/all-your-base_test.php [PHPUnit]: http://phpunit.de - ## 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/allergies/README.md b/exercises/allergies/README.md index 709d8246..27d475d5 100644 --- a/exercises/allergies/README.md +++ b/exercises/allergies/README.md @@ -29,16 +29,22 @@ 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. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar allergies/allergies_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/anagram/README.md b/exercises/anagram/README.md index 5a934da2..11532009 100644 --- a/exercises/anagram/README.md +++ b/exercises/anagram/README.md @@ -6,16 +6,22 @@ Given `"listen"` and a list of candidates like `"enlists" "google" "inlets" "banana"` the program should return a list containing `"inlets"`. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar anagram/anagram_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/atbash-cipher/README.md b/exercises/atbash-cipher/README.md index 8aebe5a8..51605518 100644 --- a/exercises/atbash-cipher/README.md +++ b/exercises/atbash-cipher/README.md @@ -28,16 +28,22 @@ things based on word boundaries. - Decoding `gvhg` gives `test` - Decoding `gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt` gives `thequickbrownfoxjumpsoverthelazydog` -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar atbash-cipher/atbash-cipher_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/beer-song/README.md b/exercises/beer-song/README.md index 623a2192..5772311b 100644 --- a/exercises/beer-song/README.md +++ b/exercises/beer-song/README.md @@ -320,16 +320,22 @@ are some additional things you could try: 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? -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar beer-song/beer-song_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/binary-search/README.md b/exercises/binary-search/README.md index ce79ee44..9706cc66 100644 --- a/exercises/binary-search/README.md +++ b/exercises/binary-search/README.md @@ -34,16 +34,22 @@ A binary search halves the number of items to check with each iteration, so locating an item (or determining its absence) takes logarithmic time. A binary search is a dichotomic divide and conquer search algorithm. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar binary-search/binary-search_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/binary/README.md b/exercises/binary/README.md index d0ee5a4a..ce26c180 100644 --- a/exercises/binary/README.md +++ b/exercises/binary/README.md @@ -30,16 +30,22 @@ Binary is similar, but uses powers of 2 rather than powers of 10. So: `101 => 1*2^2 + 0*2^1 + 1*2^0 => 1*4 + 0*2 + 1*1 => 4 + 1 => 5 base 10`. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar binary/binary_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/bob/README.md b/exercises/bob/README.md index f08ddd2b..2f875263 100644 --- a/exercises/bob/README.md +++ b/exercises/bob/README.md @@ -14,16 +14,22 @@ He answers 'Whatever.' to anything else. The commented tests at the bottom of the bob_test.php are **Stretch Goals**, they are optional. They may be easier to solve if you are using the `mb_string` functions, which aren't installed by default with every version of PHP. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar bob/bob_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/book-store/README.md b/exercises/book-store/README.md index 2324c2f3..39c22379 100644 --- a/exercises/book-store/README.md +++ b/exercises/book-store/README.md @@ -67,16 +67,22 @@ For a total of $51.20 And $51.20 is the price with the biggest discount. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar book-store/book-store_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/bowling/README.md b/exercises/bowling/README.md index cfda4ca3..a68a7ad5 100644 --- a/exercises/bowling/README.md +++ b/exercises/bowling/README.md @@ -60,16 +60,22 @@ support two operations: * `score() : int` is called only at the very end of the game. It returns the total score for that game. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar bowling/bowling_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/bracket-push/README.md b/exercises/bracket-push/README.md index fa5b9780..b657ab5b 100644 --- a/exercises/bracket-push/README.md +++ b/exercises/bracket-push/README.md @@ -3,16 +3,22 @@ Given a string containing brackets `[]`, braces `{}` and parentheses `()`, verify that all the pairs are matched and nested correctly. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar bracket-push/bracket-push_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/change/README.md b/exercises/change/README.md index 40bfd016..5e4318f4 100644 --- a/exercises/change/README.md +++ b/exercises/change/README.md @@ -16,16 +16,22 @@ that the sum of the coins' value would equal the correct amount of change. - Can you ask for negative change? - Can you ask for a change value smaller than the smallest coin value? -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar change/change_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/clock/README.md b/exercises/clock/README.md index a9eb34cc..55fb8928 100644 --- a/exercises/clock/README.md +++ b/exercises/clock/README.md @@ -6,16 +6,22 @@ You should be able to add and subtract minutes to it. Two clocks that represent the same time should be equal to each other. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar clock/clock_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/collatz-conjecture/README.md b/exercises/collatz-conjecture/README.md index 27a6cd9c..be026c7c 100644 --- a/exercises/collatz-conjecture/README.md +++ b/exercises/collatz-conjecture/README.md @@ -26,16 +26,22 @@ Starting with n = 12, the steps would be as follows: Resulting in 9 steps. So for input n = 12, the return value would be 9. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar collatz-conjecture/collatz-conjecture_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/connect/README.md b/exercises/connect/README.md index 44b2f8df..aa810510 100644 --- a/exercises/connect/README.md +++ b/exercises/connect/README.md @@ -30,20 +30,25 @@ the representation passed to your code): the above example `O` has made a connection from left to right but nobody has won since `O` didn't connect top and bottom. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar connect/connect_test.php [PHPUnit]: http://phpunit.de - ## 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/crypto-square/README.md b/exercises/crypto-square/README.md index 090975a0..20533dd1 100644 --- a/exercises/crypto-square/README.md +++ b/exercises/crypto-square/README.md @@ -69,16 +69,22 @@ aohghn sseoau ``` -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar crypto-square/crypto-square_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/difference-of-squares/README.md b/exercises/difference-of-squares/README.md index d2087f05..ed970c3d 100644 --- a/exercises/difference-of-squares/README.md +++ b/exercises/difference-of-squares/README.md @@ -12,16 +12,22 @@ Hence the difference between the square of the sum of the first ten natural numbers and the sum of the squares of the first ten natural numbers is 3025 - 385 = 2640. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar difference-of-squares/difference-of-squares_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/etl/README.md b/exercises/etl/README.md index 8ae5d5e5..fbf318d8 100644 --- a/exercises/etl/README.md +++ b/exercises/etl/README.md @@ -46,16 +46,22 @@ variety of languages, each with its own unique scoring table. For example, an "E" is scored at 2 in the Māori-language version of the game while being scored at 4 in the Hawaiian-language version. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar etl/etl_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/flatten-array/README.md b/exercises/flatten-array/README.md index 7f677671..b888478b 100644 --- a/exercises/flatten-array/README.md +++ b/exercises/flatten-array/README.md @@ -10,16 +10,22 @@ input: [1,[2,3,null,4],[null],5] output: [1,2,3,4,5] -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar flatten-array/flatten-array_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/gigasecond/README.md b/exercises/gigasecond/README.md index 2d0e46a7..f1803923 100644 --- a/exercises/gigasecond/README.md +++ b/exercises/gigasecond/README.md @@ -4,16 +4,22 @@ Calculate the moment when someone has lived for 10^9 seconds. A gigasecond is 10^9 (1,000,000,000) seconds. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar gigasecond/gigasecond_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/grade-school/README.md b/exercises/grade-school/README.md index b4f14fc0..0c7b428d 100644 --- a/exercises/grade-school/README.md +++ b/exercises/grade-school/README.md @@ -34,16 +34,22 @@ are some additional things you could try: 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? -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar grade-school/grade-school_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/grains/README.md b/exercises/grains/README.md index 8163bbdf..e28a6d60 100644 --- a/exercises/grains/README.md +++ b/exercises/grains/README.md @@ -26,16 +26,22 @@ are some additional things you could try: 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? -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar grains/grains_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/hamming/README.md b/exercises/hamming/README.md index 350dbd50..36a204f4 100644 --- a/exercises/hamming/README.md +++ b/exercises/hamming/README.md @@ -35,16 +35,22 @@ The Hamming distance is only defined for sequences of equal length. This means that based on the definition, each language could deal with getting sequences of equal length differently. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar hamming/hamming_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/hello-world/README.md b/exercises/hello-world/README.md index 47c353d3..a96e5182 100644 --- a/exercises/hello-world/README.md +++ b/exercises/hello-world/README.md @@ -14,16 +14,22 @@ The objectives are simple: If everything goes well, you will be ready to fetch your first real exercise. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar hello-world/hello-world_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/isogram/README.md b/exercises/isogram/README.md index 8231543b..3484b542 100644 --- a/exercises/isogram/README.md +++ b/exercises/isogram/README.md @@ -13,16 +13,22 @@ Examples of isograms: The word *isograms*, however, is not an isogram, because the s repeats. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar isogram/isogram_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/largest-series-product/README.md b/exercises/largest-series-product/README.md index f6d61baa..2d56cd7f 100644 --- a/exercises/largest-series-product/README.md +++ b/exercises/largest-series-product/README.md @@ -13,16 +13,22 @@ in the input; the digits need not be *numerically consecutive*. For the input `'73167176531330624919225119674426574742355349194934'`, the largest product for a series of 6 digits is 23520. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar largest-series-product/largest-series-product_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/leap/README.md b/exercises/leap/README.md index 794aded7..ce3a85bb 100644 --- a/exercises/leap/README.md +++ b/exercises/leap/README.md @@ -26,16 +26,22 @@ phenomenon, go watch [this youtube video][video]. [video]: http://www.youtube.com/watch?v=xX96xng7sAE -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar leap/leap_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/luhn/README.md b/exercises/luhn/README.md index 06c19735..7fb2bbbb 100644 --- a/exercises/luhn/README.md +++ b/exercises/luhn/README.md @@ -64,16 +64,22 @@ Sum the digits 57 is not evenly divisible by 10, so this number is not valid. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar luhn/luhn_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/markdown/README.md b/exercises/markdown/README.md index 73298d36..bbaaaacd 100644 --- a/exercises/markdown/README.md +++ b/exercises/markdown/README.md @@ -14,20 +14,25 @@ It would be helpful if you made notes of what you did in your refactoring in comments so reviewers can see that, but it isn't strictly necessary. The most important thing is to make the code better! -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar markdown/markdown_test.php [PHPUnit]: http://phpunit.de - ## 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/meetup/README.md b/exercises/meetup/README.md index 9e9d639c..a3338c91 100644 --- a/exercises/meetup/README.md +++ b/exercises/meetup/README.md @@ -26,16 +26,22 @@ Given examples of a meetup dates, each containing a month, day, year, and descriptor calculate the date of the actual meetup. For example, if given "The first Monday of January 2017", the correct meetup date is 2017/1/2. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar meetup/meetup_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/minesweeper/README.md b/exercises/minesweeper/README.md index 0e08c06a..6eeca2e0 100644 --- a/exercises/minesweeper/README.md +++ b/exercises/minesweeper/README.md @@ -26,20 +26,25 @@ into this: | 111 | +-----+ -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar minesweeper/minesweeper_test.php [PHPUnit]: http://phpunit.de - ## 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/nth-prime/README.md b/exercises/nth-prime/README.md index 8bade571..76ee9a95 100644 --- a/exercises/nth-prime/README.md +++ b/exercises/nth-prime/README.md @@ -8,16 +8,22 @@ the 6th prime is 13. If your language provides methods in the standard library to deal with prime numbers, pretend they don't exist and implement them yourself. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar nth-prime/nth-prime_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/nucleotide-count/README.md b/exercises/nucleotide-count/README.md index 22ee8ac4..34b7e551 100644 --- a/exercises/nucleotide-count/README.md +++ b/exercises/nucleotide-count/README.md @@ -12,16 +12,22 @@ Here is an analogy: - legos are to lego houses as - words are to sentences as... -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar nucleotide-count/nucleotide-count_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/ocr-numbers/README.md b/exercises/ocr-numbers/README.md index 8a6509c3..66397234 100644 --- a/exercises/ocr-numbers/README.md +++ b/exercises/ocr-numbers/README.md @@ -78,16 +78,22 @@ Update your program to handle multiple numbers, one per line. When converting se Is converted to "123,456,789" -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar ocr-numbers/ocr-numbers_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/pangram/README.md b/exercises/pangram/README.md index 7fbe1edc..45000987 100644 --- a/exercises/pangram/README.md +++ b/exercises/pangram/README.md @@ -8,16 +8,22 @@ The best known English pangram is: The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case insensitive. Input will not contain non-ASCII symbols. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar pangram/pangram_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/pascals-triangle/README.md b/exercises/pascals-triangle/README.md index 11facfae..f8c1d311 100644 --- a/exercises/pascals-triangle/README.md +++ b/exercises/pascals-triangle/README.md @@ -14,16 +14,22 @@ the right and left of the current position in the previous row. # ... etc ``` -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar pascals-triangle/pascals-triangle_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/perfect-numbers/README.md b/exercises/perfect-numbers/README.md index 812a57bc..a59e91a5 100644 --- a/exercises/perfect-numbers/README.md +++ b/exercises/perfect-numbers/README.md @@ -17,16 +17,22 @@ The Greek mathematician [Nicomachus](https://en.wikipedia.org/wiki/Nicomachus) d Implement a way to determine whether a given number is **perfect**. Depending on your language track, you may also need to implement a way to determine whether a given number is **abundant** or **deficient**. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar perfect-numbers/perfect-numbers_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/phone-number/README.md b/exercises/phone-number/README.md index 7af44158..7ae03f64 100644 --- a/exercises/phone-number/README.md +++ b/exercises/phone-number/README.md @@ -28,16 +28,22 @@ should all produce the output **Note:** As this exercise only deals with telephone numbers used in NANP-countries, only 1 is considered a valid country code. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar phone-number/phone-number_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/pig-latin/README.md b/exercises/pig-latin/README.md index 45daee5f..a2c365ce 100644 --- a/exercises/pig-latin/README.md +++ b/exercises/pig-latin/README.md @@ -17,16 +17,22 @@ variants too. See for more details. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar pig-latin/pig-latin_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/prime-factors/README.md b/exercises/prime-factors/README.md index 435cf10f..37c46d2e 100644 --- a/exercises/prime-factors/README.md +++ b/exercises/prime-factors/README.md @@ -29,16 +29,22 @@ You can check this yourself: - = 60 - Success! -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar prime-factors/prime-factors_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/queen-attack/README.md b/exercises/queen-attack/README.md index 91763ec8..b8266111 100644 --- a/exercises/queen-attack/README.md +++ b/exercises/queen-attack/README.md @@ -26,16 +26,22 @@ You'd also be able to answer whether the queens can attack each other. In this case, that answer would be yes, they can, because both pieces share a diagonal. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar queen-attack/queen-attack_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/rail-fence-cipher/README.md b/exercises/rail-fence-cipher/README.md index 2d836955..d4054474 100644 --- a/exercises/rail-fence-cipher/README.md +++ b/exercises/rail-fence-cipher/README.md @@ -58,16 +58,22 @@ W . . . E . . . C . . . R . . . L . . . T . . . E If you now read along the zig-zag shape you can read the original message. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar rail-fence-cipher/rail-fence-cipher_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/raindrops/README.md b/exercises/raindrops/README.md index 307d1182..09e7edb7 100644 --- a/exercises/raindrops/README.md +++ b/exercises/raindrops/README.md @@ -17,16 +17,22 @@ Convert a number to a string, the contents of which depend on the number's facto - 34 has four factors: 1, 2, 17, and 34. - In raindrop-speak, this would be "34". -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar raindrops/raindrops_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/rna-transcription/README.md b/exercises/rna-transcription/README.md index 24b4bcee..d2c3f075 100644 --- a/exercises/rna-transcription/README.md +++ b/exercises/rna-transcription/README.md @@ -18,16 +18,22 @@ each nucleotide with its complement: * `T` -> `A` * `A` -> `U` -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar rna-transcription/rna-transcription_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/robot-name/README.md b/exercises/robot-name/README.md index c0271a08..678bf18a 100644 --- a/exercises/robot-name/README.md +++ b/exercises/robot-name/README.md @@ -15,16 +15,22 @@ The names must be random: they should not follow a predictable sequence. Random names means a risk of collisions. Your solution must ensure that every existing robot has a unique name. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar robot-name/robot-name_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/robot-simulator/README.md b/exercises/robot-simulator/README.md index 7c562b04..12756854 100644 --- a/exercises/robot-simulator/README.md +++ b/exercises/robot-simulator/README.md @@ -27,16 +27,22 @@ direction it is pointing. - Say a robot starts at {7, 3} facing north. Then running this stream of instructions should leave it at {9, 4} facing west. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar robot-simulator/robot-simulator_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/roman-numerals/README.md b/exercises/roman-numerals/README.md index 875adf0d..92e80e56 100644 --- a/exercises/roman-numerals/README.md +++ b/exercises/roman-numerals/README.md @@ -42,16 +42,22 @@ In Roman numerals 1990 is MCMXC: See also: http://www.novaroma.org/via_romana/numbers.html -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar roman-numerals/roman-numerals_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/run-length-encoding/README.md b/exercises/run-length-encoding/README.md index abe272e0..08e32e92 100644 --- a/exercises/run-length-encoding/README.md +++ b/exercises/run-length-encoding/README.md @@ -23,16 +23,22 @@ the letters A through Z (either lower or upper case) and whitespace. This way data to be encoded will never contain any numbers and numbers inside data to be decoded always represent the count for the following character. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar run-length-encoding/run-length-encoding_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/scrabble-score/README.md b/exercises/scrabble-score/README.md index 2db7be38..6bf38b71 100644 --- a/exercises/scrabble-score/README.md +++ b/exercises/scrabble-score/README.md @@ -39,16 +39,22 @@ And to total: - You can play a double or a triple letter. - You can play a double or a triple word. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar scrabble-score/scrabble-score_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/series/README.md b/exercises/series/README.md index 7a0cd98e..63e3c6fb 100644 --- a/exercises/series/README.md +++ b/exercises/series/README.md @@ -20,16 +20,22 @@ whatever you get. Note that these series are only required to occupy *adjacent positions* in the input; the digits need not be *numerically consecutive*. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar series/series_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/sieve/README.md b/exercises/sieve/README.md index e9712c7e..72f530ce 100644 --- a/exercises/sieve/README.md +++ b/exercises/sieve/README.md @@ -27,16 +27,22 @@ Notice that this is a very specific algorithm, and the tests don't check that you've implemented the algorithm, only that you've come up with the correct list of primes. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar sieve/sieve_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/space-age/README.md b/exercises/space-age/README.md index 22a3327d..63e8bb16 100644 --- a/exercises/space-age/README.md +++ b/exercises/space-age/README.md @@ -17,16 +17,22 @@ be able to say that they're 31.69 Earth-years old. If you're wondering why Pluto didn't make the cut, go watch [this youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs). -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar space-age/space-age_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/sum-of-multiples/README.md b/exercises/sum-of-multiples/README.md index 14aced7c..dd57df21 100644 --- a/exercises/sum-of-multiples/README.md +++ b/exercises/sum-of-multiples/README.md @@ -8,16 +8,22 @@ we get 3, 5, 6, 9, 10, 12, 15, and 18. The sum of these multiples is 78. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar sum-of-multiples/sum-of-multiples_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/transpose/README.md b/exercises/transpose/README.md index 1769ea28..ad7c792a 100644 --- a/exercises/transpose/README.md +++ b/exercises/transpose/README.md @@ -58,16 +58,22 @@ In general, all characters from the input should also be present in the transpos That means that if a column in the input text contains only spaces on its bottom-most row(s), the corresponding output row should contain the spaces in its right-most column(s). -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar transpose/transpose_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/triangle/README.md b/exercises/triangle/README.md index 6579c9d0..3fc28762 100644 --- a/exercises/triangle/README.md +++ b/exercises/triangle/README.md @@ -22,16 +22,22 @@ The case where the sum of the lengths of two sides _equals_ that of the third is known as a _degenerate_ triangle - it has zero area and looks like a single line. Feel free to add your own code/tests to check for degenerate triangles. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar triangle/triangle_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/trinary/README.md b/exercises/trinary/README.md index 21c00d2e..0140affd 100644 --- a/exercises/trinary/README.md +++ b/exercises/trinary/README.md @@ -21,16 +21,22 @@ is the 3's place, the third to last is the 9's place, etc. If your language provides a method in the standard library to perform the conversion, pretend it doesn't exist and implement it yourself. -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar trinary/trinary_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/variable-length-quantity/README.md b/exercises/variable-length-quantity/README.md index f97774c0..992f6719 100644 --- a/exercises/variable-length-quantity/README.md +++ b/exercises/variable-length-quantity/README.md @@ -31,16 +31,22 @@ Here are examples of integers as 32-bit values, and the variable length quantiti 0FFFFFFF FF FF FF 7F ``` -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar variable-length-quantity/variable-length-quantity_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/word-count/README.md b/exercises/word-count/README.md index bae75ae8..76b0d886 100644 --- a/exercises/word-count/README.md +++ b/exercises/word-count/README.md @@ -11,16 +11,22 @@ come: 1 free: 1 ``` -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar word-count/word-count_test.php [PHPUnit]: http://phpunit.de diff --git a/exercises/wordy/README.md b/exercises/wordy/README.md index 48ffe7e3..a0e2463b 100644 --- a/exercises/wordy/README.md +++ b/exercises/wordy/README.md @@ -51,16 +51,22 @@ If you'd like, handle exponentials. 32 -## Making the Test Suite Pass -1. Get [PHPUnit]. +## Running the tests + +1. Go to the root of your PHP exercise directory, which is `/php`. + To find the Exercism workspace run + + % exercism debug | grep Workspace + +1. Get [PHPUnit] if you don't have it already. % wget --no-check-certificate https://phar.phpunit.de/phpunit.phar % chmod +x phpunit.phar -2. Execute the tests for an assignment. +2. Execute the tests: - % phpunit.phar wordy/wordy_test.php + % ./phpunit.phar wordy/wordy_test.php [PHPUnit]: http://phpunit.de