File size: 3,069 Bytes
12ff68f 8298ee1 12ff68f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | [
{
"instruction": "Escribe una funci贸n JavaScript que sume dos n煤meros.",
"input": "",
"output": "function sumar(a, b) {\n return a + b;\n}"
},
{
"instruction": "Corrige este c贸digo JavaScript.",
"input": "function saludar(nombre) {\n console.log('Hola ' + nombre)\n",
"output": "function saludar(nombre) {\n console.log('Hola ' + nombre);\n}"
},
{
"instruction": "Crea un bot贸n HTML que diga Iniciar.",
"input": "",
"output": "<button id=\"startButton\">Iniciar</button>"
},
{
"instruction": "Crea una funci贸n en Python que multiplique dos n煤meros.",
"input": "",
"output": "def multiplicar(a, b):\n return a * b"
},
{
"instruction": "Explica qu茅 hace este c贸digo.",
"input": "const resultado = 5 + 3;",
"output": "El c贸digo suma 5 y 3 y guarda el resultado, 8, en la variable resultado."
},
{
"instruction": "Crea una funci贸n Luau que salude a un jugador.",
"input": "",
"output": "local function saludarJugador(player)\n print(\"Hola, \" .. player.Name .. \"!\")\nend"
},
{
"instruction": "Crea una funci贸n JavaScript que compruebe si un n煤mero es par.",
"input": "",
"output": "function esPar(numero) {\n return numero % 2 === 0;\n}"
},
{
"instruction": "Crea un bucle Python que imprima los n煤meros del 1 al 10.",
"input": "",
"output": "for i in range(1, 11):\n print(i)"
},
{
"instruction": "Corrige este c贸digo Python.",
"input": "def sumar(a, b)\n return a + b",
"output": "def sumar(a, b):\n return a + b"
},
{
"instruction": "Crea un bot贸n HTML con un evento JavaScript.",
"input": "",
"output": "<button id=\"boton\">Presionar</button>\n\n<script>\ndocument.getElementById(\"boton\").addEventListener(\"click\", () => {\n console.log(\"Bot贸n presionado\");\n});\n</script>"
},
{
"instruction": "Crea una funci贸n Luau que encuentre a un jugador por nombre.",
"input": "",
"output": "local Players = game:GetService(\"Players\")\n\nlocal function buscarJugador(nombre)\n return Players:FindFirstChild(nombre)\nend"
},
{
"instruction": "Explica qu茅 hace este c贸digo JavaScript.",
"input": "const nombres = [\"Ana\", \"Luis\", \"Carlos\"];",
"output": "Crea un array llamado nombres que contiene tres cadenas de texto: Ana, Luis y Carlos."
},
{
"instruction": "Crea una funci贸n Python que devuelva el n煤mero mayor entre dos n煤meros.",
"input": "",
"output": "def mayor(a, b):\n return max(a, b)"
},
{
"instruction": "Corrige este HTML.",
"input": "<button>Hola<button>",
"output": "<button>Hola</button>"
},
{
"instruction": "Crea una funci贸n JavaScript que convierta grados Celsius a Fahrenheit.",
"input": "",
"output": "function celsiusAFahrenheit(celsius) {\n return (celsius * 9 / 5) + 32;\n}"
},
{
"instruction": "Crea una funci贸n Luau que cree una Part.",
"input": "",
"output": "local part = Instance.new(\"Part\")\npart.Parent = workspace"
}
] |