From e85b91de361b5d8ea1230e1c80bb4848685a64f1 Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Tue, 3 Mar 2015 17:10:33 +0900 Subject: [PATCH] Fixup of bonfires for clarity, thanks to our users --- seed_data/bonfires.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index a389e7a118..d2cbb72c0d 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -198,13 +198,18 @@ "name": "Mutations", "difficulty": "1.12", "description": [ - "Return true if the string in the first element of the array contains the string in the second element in any form." + "Return true if the string in the first element of the array contains the letters of the string in the second element of the array.", + "For example, ['hello', 'Hello'], should return true because all of the letters in the second string are present in the first, ignoring case.", + "The arguments ['hello', 'hey'] should return false because the string 'hello' does not contain a 'y'.", + "Another example, ['Alien', 'line'], should return true because all of the letters in 'line' are present in 'Alien'." ], "challengeSeed": "function mutation(arr) {\n return arr;\n}\n\nmutation(['hello', 'hey']);", "tests": [ "expect(mutation(['hello', 'hey'])).to.be.false;", "expect(mutation(['hello', 'Hello'])).to.be.true;", - "expect(mutation(['zyxwvutsrqponmlkjihgfedcba', 'qrstu'])).to.be.true;" + "expect(mutation(['zyxwvutsrqponmlkjihgfedcba', 'qrstu'])).to.be.true;", + "expect(mutation(['Mary', 'Army'])).to.be.true;", + "expect(mutation(['Alien', 'line'])).to.be.true;" ] }, { @@ -566,9 +571,10 @@ "Return a new array that transforms the element's average altitude into their orbital periods.", "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}.", "You can read about orbital periods on wikipedia.", - "The values should be rounded to the nearest whole number. Assume the body being orbited is Earth." + "The values should be rounded to the nearest whole number. The body being orbited is Earth.", + "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418" ], - "challengeSeed": "function orbitalPeriod(arr) {\n\/\/Use 398600.4418 for GM. Look up any other values on wolfram alpha\n return arr;\r\n}\r\n\r\norbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);", + "challengeSeed": "function orbitalPeriod(arr) {\n var GM = 398600.4418;\n var earthRadius = 6367.4447;\n return arr;\r\n}\r\n\r\norbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);", "tests": [ "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);", "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);"