diff --git a/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json b/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json
index b1c9297d1b..7379c9ec1d 100644
--- a/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json
+++ b/challenges/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting.json
@@ -99,6 +99,47 @@
}
}
},
+ {
+ "id": "56533eb9ac21ba0edf2244b3",
+ "title": "Convert Celsius to Fahrenheit",
+ "description": [
+ "The algorithm to convert from Celsius to Fahrenheit is the temperature in Celsius times 9/5
, plus 32
.",
+ "You are given a variable celsius
representing a temperature in Celsius. Use the variable fahrenheit
already defined and apply the algorithm to assign it the corresponding temperature in Fahrenheit."
+ ],
+ "releasedOn": "January 1, 2016",
+ "challengeSeed": [
+ "function convertToF(celsius) {",
+ " var fahrenheit;",
+ " return fahrenheit;",
+ "}",
+ "",
+ "convertToF(30);"
+ ],
+ "solutions": [
+ "function convertToF(celsius) {\n var fahrenheit = celsius * 9/5 + 32;\n if ( typeof fahrenheit !== 'undefined' ) {\n return fahrenheit;\n } else {\n return 'fahrenheit not defined';\n }\n}"
+ ],
+ "tests": [
+ "assert(typeof convertToF(0) === 'number', 'message: convertToF(0)
should return a number');",
+ "assert(convertToF(-30) === -22, 'message: convertToF(-30)
should return a value of -22
');",
+ "assert(convertToF(-10) === 14, 'message: convertToF(-10)
should return a value of 14
');",
+ "assert(convertToF(0) === 32, 'message: convertToF(0)
should return a value of 32
');",
+ "assert(convertToF(20) === 68, 'message: convertToF(20)
should return a value of 68
');",
+ "assert(convertToF(30) === 86, 'message: convertToF(30)
should return a value of 86
');"
+ ],
+ "type": "checkpoint",
+ "challengeType": 1,
+ "isRequired": true,
+ "translations": {
+ "es": {
+ "title": "Convierte celsius a fahrenheit",
+ "description": [
+ "Para probar tu aprendizaje, crearás una solucion \"desde cero\". Coloca tu código entre las líneas indicadas y este será probado contra multiples casos de prueba.",
+ "El algoritmo para convertir de Celsius a Fahrenheit consiste en multiplicar la temperatura en grados Celsius por 9/5 y al resultado agregarle 32.",
+ "Se te da una variable celsius
representando una temperatura en Celsius. Crea una variable fahrenheit
y aplica el algoritmo para asignar la correspondiente temperatura en Fahrenheit."
+ ]
+ }
+ }
+ },
{
"id": "a202eed8fc186c8434cb6d61",
"title": "Reverse a String",
@@ -894,4 +935,4 @@
}
}
]
-}
+}
\ No newline at end of file
diff --git a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json
index b95068d735..6ad13602e8 100755
--- a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json
+++ b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json
@@ -967,53 +967,6 @@
}
}
},
- {
- "id": "56533eb9ac21ba0edf2244b3",
- "title": "Convert Celsius to Fahrenheit",
- "description": [
- "To test your learning, you will create a solution \"from scratch\". Place your code between the indicated lines and it will be tested against multiple test cases.",
- "The algorithm to convert from Celsius to Fahrenheit is the temperature in Celsius times 9/5
, plus 32
.",
- "You are given a variable celsius
representing a temperature in Celsius. Use the variable fahrenheit
already defined and apply the algorithm to assign it the corresponding temperature in Fahrenheit.",
- "Note
Don't worry too much about the function
and return
statements as they will be covered in future challenges. For now, only use operators that you have already learned."
- ],
- "releasedOn": "January 1, 2016",
- "challengeSeed": [
- "function convertToF(celsius) {",
- " var fahrenheit;",
- " // Only change code below this line",
- " ",
- " ",
- " // Only change code above this line",
- " return fahrenheit;",
- "}",
- "",
- "// Change the inputs below to test your code",
- "convertToF(30);"
- ],
- "solutions": [
- "function convertToF(celsius) {\n var fahrenheit = celsius * 9/5 + 32;\n if ( typeof fahrenheit !== 'undefined' ) {\n return fahrenheit;\n } else {\n return 'fahrenheit not defined';\n }\n}"
- ],
- "tests": [
- "assert(typeof convertToF(0) === 'number', 'message: convertToF(0)
should return a number');",
- "assert(convertToF(-30) === -22, 'message: convertToF(-30)
should return a value of -22
');",
- "assert(convertToF(-10) === 14, 'message: convertToF(-10)
should return a value of 14
');",
- "assert(convertToF(0) === 32, 'message: convertToF(0)
should return a value of 32
');",
- "assert(convertToF(20) === 68, 'message: convertToF(20)
should return a value of 68
');",
- "assert(convertToF(30) === 86, 'message: convertToF(30)
should return a value of 86
');"
- ],
- "type": "checkpoint",
- "challengeType": 1,
- "translations": {
- "es": {
- "title": "Convierte celsius a fahrenheit",
- "description": [
- "Para probar tu aprendizaje, crearás una solucion \"desde cero\". Coloca tu código entre las líneas indicadas y este será probado contra multiples casos de prueba.",
- "El algoritmo para convertir de Celsius a Fahrenheit consiste en multiplicar la temperatura en grados Celsius por 9/5 y al resultado agregarle 32.",
- "Se te da una variable celsius
representando una temperatura en Celsius. Crea una variable fahrenheit
y aplica el algoritmo para asignar la correspondiente temperatura en Fahrenheit."
- ]
- }
- }
- },
{
"id": "bd7123c9c444eddfaeb5bdef",
"title": "Declare String Variables",