Updated language and added more test cases
This commit is contained in:
@ -306,15 +306,16 @@
|
|||||||
"_id": "a7f4d8f2483413a6ce226cac",
|
"_id": "a7f4d8f2483413a6ce226cac",
|
||||||
"name": "Roman Numeral Converter",
|
"name": "Roman Numeral Converter",
|
||||||
"tests": [
|
"tests": [
|
||||||
"expect(convert(\"xii\")).to.equal(12);",
|
"expect(convert(12)).to.equal(\"XII\");",
|
||||||
"expect(convert(\"XLII\")).to.equal(42);",
|
"expect(convert(5)).to.equal(\"V\");",
|
||||||
"expect(convert(9)).to.equal(\"IX\");"
|
"expect(convert(9)).to.equal(\"IX\");",
|
||||||
|
"expect(convert(29)).to.equal(\"XXIX\");",
|
||||||
|
"expect(convert(16)).to.equal(\"XVI\");"
|
||||||
],
|
],
|
||||||
"difficulty": "2.02",
|
"difficulty": "2.02",
|
||||||
"description": [
|
"description": [
|
||||||
"Convert between roman numerals and numbers depending on the input given.",
|
"Convert the number be a roman numeral.",
|
||||||
"If input is given a roman numeral return the integer equivalent",
|
"All <a href=\"http://www.mathsisfun.com/roman-numerals.html\">roman numerals</a> answers should be provided in upper-case."
|
||||||
"If input is given in an integer give the roman numeral equivalent"
|
|
||||||
],
|
],
|
||||||
"challengeSeed": "function convert(num) {\n return num;\r\n}\n\nconvert(36);"
|
"challengeSeed": "function convert(num) {\n return num;\r\n}\n\nconvert(36);"
|
||||||
},
|
},
|
||||||
@ -322,16 +323,18 @@
|
|||||||
"_id": "a0b5010f579e69b815e7c5d6",
|
"_id": "a0b5010f579e69b815e7c5d6",
|
||||||
"name": "Search and Replace",
|
"name": "Search and Replace",
|
||||||
"tests": [
|
"tests": [
|
||||||
"expect(replace(\"Let's go to the store\", \"store\", \"mall\")).to.equal(\"Let's go to the mall\");",
|
"expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");",
|
||||||
"expect(replace(\"He's sleeping on the couch\", \"sleeping\", \"sitting\")).to.equal(\"He's sitting on the couch\");",
|
"expect(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")).to.equal(\"He is Sitting on the couch\");",
|
||||||
"expect(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\")).to.equal(\"This has a spelling error\");",
|
"expect(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\")).to.equal(\"This has a spelling error\");",
|
||||||
"expect(replace(\"His name is Tom\", \"Tom\", \"john\")).to.equal(\"His name is John\");"
|
"expect(replace(\"His name is Tom\", \"Tom\", \"john\")).to.equal(\"His name is John\");",
|
||||||
|
"expect(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\")).to.equal(\"Let us get back to more Bonfires\");"
|
||||||
],
|
],
|
||||||
"difficulty": "2.03",
|
"difficulty": "2.03",
|
||||||
"description": [
|
"description": [
|
||||||
"Perform a search and replace on a string",
|
"Perform a search and replace on the sentence using the arguments provided and return the new sentence.",
|
||||||
"Use the second argument as the before and the third as the after",
|
"First argument is the sentence the perform the search and replace on.",
|
||||||
"Note: Keep the same capitalization on the new word as the old word"
|
"Second argument is the word that you will be replacing (before).",
|
||||||
|
"Third argument is what you will be replacing the second argument with (after)."
|
||||||
],
|
],
|
||||||
"challengeSeed": "function replace(str, before, after) {\n return str;\r\n}\n\nreplace(\"A quick brown fox jumped over the lazy dog\", \"jumped\", \"leaped\");"
|
"challengeSeed": "function replace(str, before, after) {\n return str;\r\n}\n\nreplace(\"A quick brown fox jumped over the lazy dog\", \"jumped\", \"leaped\");"
|
||||||
},
|
},
|
||||||
@ -339,13 +342,17 @@
|
|||||||
"_id": "aa7697ea2477d1316795783b",
|
"_id": "aa7697ea2477d1316795783b",
|
||||||
"name": "Pig Latin",
|
"name": "Pig Latin",
|
||||||
"tests": [
|
"tests": [
|
||||||
"expect(translate(\"California\")).to.equal(\"Aliforniacay\");",
|
"expect(translate(\"california\")).to.equal(\"aliforniacay\");",
|
||||||
"expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");",
|
"expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");",
|
||||||
"expect(translate(\"algorithm\")).to.equal(\"algorithmway\");"
|
"expect(translate(\"glove\")).to.equal(\"oveglay\");",
|
||||||
|
"expect(translate(\"algorithm\")).to.equal(\"algorithmway\");",
|
||||||
|
"expect(translate(\"eight\")).to.equal(\"eightway\");"
|
||||||
],
|
],
|
||||||
"difficulty": "2.04",
|
"difficulty": "2.04",
|
||||||
"description": [
|
"description": [
|
||||||
"Translate the provided string to pig latin"
|
"Translate the provided string to pig latin.",
|
||||||
|
"<a href=\"http://en.wikipedia.org/wiki/Pig_Latin\">Pig Latin</a> takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".",
|
||||||
|
"If a word begins with a vowel you just add \"way\" to the end."
|
||||||
],
|
],
|
||||||
"challengeSeed": "function translate(str) {\n return str;\r\n}\n\ntranslate(\"consonant\");"
|
"challengeSeed": "function translate(str) {\n return str;\r\n}\n\ntranslate(\"consonant\");"
|
||||||
},
|
},
|
||||||
@ -359,7 +366,8 @@
|
|||||||
],
|
],
|
||||||
"difficulty": "2.05",
|
"difficulty": "2.05",
|
||||||
"description": [
|
"description": [
|
||||||
"Translate the DNA string and create a 2D array of base pairs",
|
"The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.",
|
||||||
|
"<a href=\"http://en.wikipedia.org/wiki/Base_pair\">Base pairs</a> are a pair of AT and CG. Match the missing element to the provided character.",
|
||||||
"Return the provided character as the first element in each array."
|
"Return the provided character as the first element in each array."
|
||||||
],
|
],
|
||||||
"challengeSeed": "function pair(str) {\n return str;\r\n}\n\npair(\"GCG\");"
|
"challengeSeed": "function pair(str) {\n return str;\r\n}\n\npair(\"GCG\");"
|
||||||
|
Reference in New Issue
Block a user