Please enable JavaScript to use CodeHS

Introducción a la Informática en JavaScript (Golden) (2022)

Description

En esta lección, se les presenta a los estudiantes a CodeHS y cómo Karel el perro puede recibir un conjunto de instrucciones para realizar una tarea simple.

Objective

Students will be able to:

  • Write their first Karel program by typing out all of the Karel commands with proper syntax

  • Explain how giving commands to a computer is like giving commands to a dog

Description

En esta lección, los estudiantes aprenden más sobre Karel y Karel’s World. Los estudiantes aprenden sobre las paredes en el mundo de Karel, las instrucciones que Karel puede enfrentar y cómo identificar una ubicación en el mundo de Karel utilizando calles y avenidas. En estos ejercicios, los estudiantes comenzarán a ver las limitaciones de los mandamientos de Karel. Los estudiantes deberán aplicar el conjunto limitado de comandos de Karel a nuevas situaciones. Por ejemplo, ¿cómo pueden hacer que Karel gire a la derecha, a pesar de que Karel no conoce un comando Turnight?

Objective

Students will be able to…

  • Identify the direction that Karel is facing
  • Predict what direction Karel will be facing after executing a series of commands
  • Identify a location in Karel’s world using Street, Avenue terminology
Description

En esta lección, los estudiantes aprenderán cómo pueden crear sus propios comandos para Karel llamando y definiendo funciones. Las funciones permiten a los programadores crear y reutilizar nuevos comandos que hacen que el código sea más legible y escalable.

Objective

Students will be able to:

  • Define a function, and successfully implement functions in their code.
  • Teach Karel a new command by creating a turnRight() function
Description

En esta lección, los estudiantes aprenden con más detalle sobre las funciones y cómo pueden usar funciones para dividir sus programas en piezas más pequeñas y hacerlos más fáciles de entender.

Objective

Students will be able to:

  • Create functions to teach Karel new commands
  • Explain the difference between defining and calling a function
  • Utilize these functions to write higher level Karel programs that go beyond the basic toolbox of commands that Karel starts with
Description

En esta lección, los estudiantes profundizarán su comprensión de las funciones aprendiendo sobre la función de inicio. La función de inicio ayuda a organizar la legibilidad del código mediante la creación de un lugar designado donde se puede almacenar el código que se ejecutará en un programa:

función start () {
   Gire a la derecha();
}

función Turnright () {
   Gire a la izquierda();
   Gire a la izquierda();
   Gire a la izquierda();
}
Objective

Students will be able to:

  • Explain the functionality of the start function
  • Use the start function appropriately in their programs
  • Improve the readability of their code
Description

En esta lección, los estudiantes aprenden sobre el diseño y la descomposición de arriba hacia abajo. El diseño de arriba hacia abajo es el proceso de descomponer un gran problema en partes más pequeñas.

Objective

Students will be able to:

  • Break a large problem down into smaller, simpler problems
  • Write methods that solve the simpler problems, and use them as building blocks to solve the larger problem
  • Compare programs and identify good vs poor decomposition
Description

En esta lección, los estudiantes aprenden cómo diseñar sus programas incluyendo comentarios. Los comentarios permiten a los estudiantes dejar notas en su programa que faciliten que otros lean. Los comentarios están escritos en inglés simple.
Comentando su ejemplo de código:

/*
 * Comentarios de múltiples líneas
 */

// Comentarios de una sola línea
Objective

Students will be able to:

  • Explain the preconditions and postconditions of a function
  • Create clear and readable comments in their code that help the reader understand the code
  • Explain the purpose of comments
Description

¡En esta lección, los estudiantes se presentan a Super Karel! Dado que los comandos como Turnright () y Turnaround () se usan tan comúnmente, los estudiantes no deberían tener que definirlos en cada programa. Aquí es donde entra Superkarel. Superkarel es al igual que Karel, excepto que Superkarel ya sabe cómo tirar de la derecha y el cambio, ¡por lo que los estudiantes ya no tienen que definir esas funciones!

Objective

Students will be able to:

  • Write programs that use SuperKarel instead of Karel
  • Utilize the new toolbox of commands that SuperKarel provides over Karel
  • Read documentation to understand how to use a library (SuperKarel is an example of this)
Description

En esta lección, los estudiantes aprenden a usar para bucles en sus programas. El bucle para los estudiantes permite repetir una parte específica del código un número fijo de veces.

Para los bucles se escriben así:

para (var i = 0; i <4; i ++)
{
// El código se repetirá 4 veces
}
Objective

Students will be able to:

  • Create for loops to repeat code a fixed number of times
  • Explain when a for loop should be a used
  • Utilize for loops to write programs that would be difficult / impossible without loops
Description

En esta lección, los estudiantes aprenden sobre la declaración condicional “si”. El código dentro de una “Declaración if” solo se ejecutará si la condición es verdadera.

if (fronticeScear ()) {
    // El código se ejecutará solo si el frente está claro
}
Objective

Students will be able to:

  • Use conditions to gather information about Karel’s world (is the front clear, is Karel facing north, etc)
  • Create if statements that only execute code if a certain condition is true
Description

En esta lección, los estudiantes aprenden sobre una estructura de control adicional, si/else declara declaraciones. Declaraciones de si/else Deje que los estudiantes hagan una cosa si una condición es verdadera, y algo más de lo contrario.

Las declaraciones si/else se escriben así:

if (frontIsclar ())
 {
      // código para ejecutar si el frente está claro
 }
 demás
 {
      // código para ejecutar lo contrario
 }
Objective

Students will be able to:

  • Explain the purpose of an If/Else statement
  • Create If/Else statements to solve new types of problems
  • Identify when it is appropriate to use an If/Else statement
Description

En esta lección, los estudiantes reciben un nuevo tipo de bucle: mientras que los bucles. Mientras que los bucles permiten que Karel repita el código * mientras * una determinada condición es verdadera. Mientras que los bucles permiten a los estudiantes crear soluciones generales a problemas que funcionarán en múltiples mundos de Karel, en lugar de solo uno.

Objective

Students will be able to:

  • Explain the purpose of a while loop
  • Create while loops to repeat code while a condition is true
  • Utilize while loops to solve new types of problems
  • Test their solutions on different Karel worlds
Description

En esta lección, los estudiantes aprenden cómo combinar e incorporar las diferentes estructuras de control que han aprendido a crear programas más complejos.

Objective

Students will be able to:

  • Identify the different control structures we can use to modify the flow of control through a program
  • Combine control structures to solve complicated problems
  • Choose the proper control structure for a given problem
Description

En esta lección, los estudiantes reciben práctica adicional con estructuras de control. Los estudiantes continuarán viendo diferentes formas en que, si, si/else, mientras y para los bucles afectan su código y lo que Karel puede hacer.

Objective

Students will be able to:

  • Debug common errors in code
  • Use control structures to create general solutions that work on all Karel worlds
Description

En esta lección, los estudiantes revisan cómo deben sangrar su código para que sea más fácil de leer.

Objective

Students will be able to:

  • Explain why it is important to indent code
  • Identify proper indentation
  • Modify a program to have proper indentation
  • Write programs with proper indentation
Description

En esta lección, los estudiantes revisan el contenido con un cuestionario de la Unidad de Preguntas de 25.

Objective

Students will be able to:

  • Prove their knowledge of basic coding concepts with Karel through a multiple choice quiz
Description

En esta unidad, los estudiantes sintetizarán todas las habilidades y conceptos aprendidos en la unidad Karel para resolver rompecabezas de Karel cada vez más desafiantes.

Objective

Students will be able to:

  • Define a problem in their own words and plan out a solution to the problem
  • Break a large problem down into smaller pieces and solve each of the pieces, then use these solutions as building blocks to solve the larger problem
  • Utilize the proper control structures to create general solutions that solve multiple Karel worlds
  • Write clear and readable code using control structures, functions, decomposition, and comments
Description

En esta lección, los estudiantes aprenderán cómo imprimir mensajes en la consola utilizando el comando JavaScript println.

Objective

Students will be able to:

  • Write a JavaScript program by typing commands with proper syntax in the start function
  • Write a program that prints out a message to the user
Description

En esta lección, los estudiantes aprenden cómo asignar valores a variables, manipular esos valores variables y usarlos en las declaraciones del programa. Esta es la lección introductoria sobre cómo los datos se pueden almacenar en variables.

Objective

Students will be able to…

  • Explain what variables are and what they are used for
  • Create their own variables
  • Print out the values stored in variables
Description

En esta lección, los estudiantes aprenden cómo pueden permitir a los usuarios ingresar información en sus programas y usar esa entrada en consecuencia.

Objective

Students will be able to…

  • Create programs that ask the user for input
  • Store user input in variables and print it back to the user
  • Choose the proper input function to use depending on the type of information needed
Description

En esta lección, los estudiantes aprenden sobre los diferentes operadores matemáticos que pueden usar para realizar cálculos matemáticos y crear programas útiles que calculen información para el usuario.

Objective

Students will be able to…

  • Describe the different mathematical operators we can use in programs
  • Create programs that use basic math to compute useful things
  • Create programs that take in user input, do simple computations with the input, and produce useful output
Description

En esta lección, los estudiantes aprenderán los conceptos básicos de crear objetos gráficos. La creación gráfica se basa en establecer el tipo, la forma, el tamaño, la posición y el color en el lienzo del artista antes de agregar a la pantalla. Usando los conceptos geométricos y el concepto de `getWidth ()` y `getheight ()`, se pueden crear múltiples objetos gráficos en JavaScript.

Objective

Students will be able to…

  • Create graphical JavaScript programs that draw shapes on the canvas
  • Locate points on the graphics canvas using (x, y) coordinates
Description

En esta lección, los estudiantes revisan el contenido con un quiz de la unidad de 25 preguntas.

Objective

Students will be able to:

  • Prove their knowledge of basic coding concepts through a multiple choice quiz
Description

En esta lección, los estudiantes aprenderán qué es la programación de pares, por qué se usa y los comportamientos apropiados de un conductor y navegador.

Objective

Students will be able to:

  • Effectively communicate their ideas to a partner
  • Successfully complete a coding exercise using pair programming
  • Identify the pros and cons of pair programming
Description

En esta unidad, los estudiantes sintetizarán todas las habilidades y conceptos aprendidos en la unidad de JavaScript and Graphics para resolver rompecabezas cada vez más desafiantes.

Objective

Students will be able to:

  • Define a problem in their own words and plan out a solution to the problem
  • Break a large problem down into smaller pieces and solve each of the pieces, then use these solutions as building blocks to solve the larger problem
  • Write clear and readable graphics programs
Description

En esta lección, los estudiantes aprenderán más sobre los valores booleanos. Los booleanos se refieren a un valor que es verdadero o falso, y se usan para probar si una condición específica es verdadera o falsa.

Objective

Students will be able to…

  • Create boolean variables to represent meaningful yes/no values
  • Print out the value of a boolean variable
Description

En esta lección, los estudiantes aprenderán sobre operadores lógicos. Los operadores lógicos permiten a los estudiantes conectar o modificar las expresiones booleanas. Tres operadores lógicos son los caracteres!, ||, &&.

  • ¡! = NOT (no)
  • || = OR (o)
  • && = AND (y)
Objective

Students will be able to…

  • Describe the meaning and usage of each logical operator: OR (||), AND (&&), and NOT (!)
  • Construct logical statements using boolean variables and logical operators
Description

En esta lección, los estudiantes aprenden a usar operadores de comparación. Los operadores de comparación permiten a los estudiantes comparar dos valores.

Objective

Students will be able to…

  • Explain the meaning of each of the comparison operators (<, <=, >, >=, ==, !=)
  • Create programs using the comparison operators to compare values
  • Predict the boolean result of comparing two values
  • Print out the boolean result of comparing values
Description

En esta lección, los estudiantes aprenden sobre las if statements (declaraciones si) como una forma de tomar decisiones y ejecutar código específico dependiendo de la validez de una condición.

Objective

Students will be able to…

  • Explain the purpose of if statements
  • Create their own if statements to selective choose which code is executed in their programs
Description

En esta lección, los alumnos aprenderán con más detalle sobre los for loops. Los for loops en Javascript se escriben y ejecutan de la misma manera que los ejercicios de Karel, excepto que ahora los estudiantes explorarán la modificación de la sentencia de inicialización, la sentencia de prueba y las sentencias de incremento de los loops.

Objective

Students will be able to…

  • Create for loops in JavaScript
  • Explain the purpose of for loops
  • Utilize for loops to avoid typing out repeated code
  • Use the loop counter i inside the for loop code to do something different on each iteration
Description

En esta lección, los estudiantes explorarán con más detalle cómo pueden modificar la instrucción de inicialización, la instrucción de prueba y la instrucción de incremento en un for loop.

Objective

Students will be able to…

  • Explain the three parts of the for loop (initialization statement, test statement, increment statement)
  • Create for loops that iterate differently than the basic for loop structure (ie count by twos or count backwards)
Description

En esta lección, los estudiantes aprenderán cómo crear loops para resolver problemas cada vez más desafiantes mediante el uso de loops y estructuras de control de ramificación.

Objective

Students will be able to…

  • Explain the purpose of for loops
  • Create for loops to solve increasingly challenging problems
  • Create nested for loops
Description

En esta lección, los estudiantes aprenderán cómo la aleatorización puede mejorar un programa y usarse en combinación con diversas estructuras de control.

Objective

Students will be able to…

  • Explain why random numbers are a useful part of computer programs
  • Create random values in a program
  • Utilize the DOCS for the Randomizer class in order to learn how to generate random values
Description

En esta lección, los estudiantes explorarán while loops y variables de JavaScript. Esto combina las ideas de crear variables, actualizar variables a lo largo de un loop y determinar la condición final correcta.

Objective

Students will be able to…

  • Explain the purpose of a while loop
  • Create while loops to repeat code while a condition is true
  • Utilize while loops to solve new types of problems
Description

En esta lección, los estudiantes aprenderán a crear un Loop and Half. Un loop and a half es una forma específica de escribir un while loop con la condición true (verdadero). Dentro del loop, los estudiantes crean un valor SENTINEL para salir del loop cada vez que se cumpla la condición, haciendo que el loop termine.

Objective

Students will be able to:

  • Explain how the loop-and-a-half structure is different from a traditional while loop
  • Explain what an infinite loop is
  • Explain what the break statement does
  • Create programs that use the loop-and-a-half structure to repeat code until a SENTINEL is met, causing the program to break out of the loop
Description

En esta lección, los alumnos repasan los contenidos con un cuestionario de la unidad de 15 preguntas.

Objective

Students will be able to:

  • Prove their knowledge of control structures through a multiple choice quiz
Description

En esta unidad, los estudiantes sintetizarán todas las habilidades y conceptos aprendidos en la unidad de estructuras de control para resolver rompecabezas cada vez más desafiantes.

Objective

Students will be able to:

  • Define a problem in their own words and plan out a solution to the problem
  • Break a large problem down into smaller pieces and solve each of the pieces, then use these solutions as building blocks to solve the larger problem
  • Utilize the proper control structures to create general solutions
  • Write clear and readable code using control structures, decomposition, and comments
Description

En esta lección, los estudiantes aprenden sobre funciones y parámetros en el contexto de JavaScript, que se basa en su conocimiento previo de trabajar con funciones en Karel. Esta lección se centra específicamente en definir y llamar a las funciones, y transmitir parámetros simples y únicos a las funciones.

Objective

Students will be able to…

  • Explain the purpose of functions
  • Create JavaScript functions
  • Utilize JavaScript functions to solve simple problems
  • Create functions that take in parameters as input
Description

En esta lección, los estudiantes trabajarán, definirán y llamarán sus propias funciones que toman múltiples parámetros como entrada e salida de impresión.

Objective

Students will be able to:

  • Explain the purpose of functions
  • Create JavaScript functions
  • Utilize JavaScript functions to solve simple problems
  • Create functions that take in multiple parameters as input, and use print statements for output
Description

En esta lección, los estudiantes continúan trabajando con * múltiples * parámetros que crean gráficos como salida que es muy útil, ya que crear varios objetos gráficos diferentes implica escribir el mismo código una y otra vez (establezca el tamaño, establezca el color, establezca la ubicación, etc).

Objective

Students will be able to:

  • Explain the purpose of functions
  • Create JavaScript functions
  • Utilize JavaScript functions to simplify graphics programs
  • Identify repeated code that can be simplified with functions and parameters
  • Create functions that take in multiple parameters as input, and create graphics as output
Description

En esta lección, los estudiantes aprenden sobre los valores de retorno para que puedan escribir funciones que trabajen y envíen el resultado o use más adelante en el programa.

Objective

Students will be able to:

  • Explain the purpose of returning a value from a function.
  • Create functions that return values.
  • Create programs that call functions with return values and store the result for later use.
Description

En esta lección, los estudiantes trabajan y definen funciones con valores de retorno y más de un parámetro.

Objective

Students will be able to:

  • Explain the purpose of returning a value from a function.
  • Create functions that return values.
  • Create programs that call functions with return values and use the return values to solve a higher order problem.
Description

En esta lección, los estudiantes explorarán el alcance de una variable, que es donde la variable está “definida” o donde existe.

Objective

Students will be able to:

  • Identify the scope of a variable
  • Identify which variables are in scope at a given point in a program
Description

En esta lección, los estudiantes revisan el contenido con un cuestionario de 15 unidades de preguntas.

Objective

Students will be able to:

  • Prove their knowledge of functions and parameters through a multiple choice quiz
Description

En esta unidad, los alumnos sintetizarán todas las habilidades y conceptos aprendidos en la unidad Funciones y parámetros para resolver puzzles cada vez más desafiantes.

Objective

Students will be able to:

  • Synthesize the skills and concepts from the JavaScript and Graphics, JavaScript Control Structures, and the Functions and Parameters units to solve increasingly difficult programming challenges
  • Break down a large problem into smaller parts using Top Down Design, and solve each of these smaller parts using functions
  • Create helpful comments with preconditions and postconditions to help the reader understand the code
  • Find and fix bugs in large programs
Description

En esta lección, los estudiantes serán presentados al concepto de usar temporizadores para la animación. Ahora, en lugar de tener programas de gráficos que permanezcan igual, el contenido cambia cada vez que se ejecuta el temporizador. El primer programa que los estudiantes verán es una pelota en movimiento, por lo que discutir esto con la clase como una demostración en el proyector es muy útil.

Objective

Students will be able to:

  • Explain in their own words how animation works
  • Create animation in programs using the setTimer function
  • Explain what a callback function is
Description

En esta lección, veremos más ejemplos con temporizadores y comenzaremos a hacer animaciones más interesantes. Los estudiantes usarán temporizadores y el aleatorizador para crear animaciones en el lienzo.

Objective

Students will be able to:

  • Create programs with timers to create increasingly challenging animations
  • Analyze existing programs and explain how they create animations
  • Utilize the Randomizer to generate random events in their animations
Description

En esta lección, los estudiantes usan temporizadores en combinación con las otras ideas que han aprendido, incluidos más gráficos y coordinar matemáticas para crear diferentes objetos. Los fantasmas aleatorios sirven como un ejemplo divertido para mostrar cómo puede modificar las cosas una vez que tenga los bloques de construcción básicos para hacerlos más legibles y más fáciles de alterar.

Objective

Students will be able to:

  • Explain the general workflow of creating an animation program
  • Analyze animation programs and identify similarities and differences
  • Create increasingly challenging animations using timers, graphics, and the Randomizer
Description

En esta lección, los estudiantes se basan en el uso de temporizadores y utilizan las declaraciones de los temporizadores dentro de los temporizadores para cambiar dinámicamente lo que están haciendo las animaciones.

Objective

Students will be able to:

  • Create increasingly challenging animations that simulate movement using timers
Description

En esta lección, los estudiantes se introducen en la forma en que se puede tomar la entrada del mouse del usuario utilizando el método hecho para hacer clic en el mouse.

Objective

Students will be able to:

  • Describe how events are different than timers
  • Use mouse click events to create programs that respond to user clicks
Description

En esta lección, los estudiantes aprenden cómo extender los eventos del mouse para hacer animaciones interactivas utilizando el movimiento de arrastre del mouse.

Objective

Students will be able to:

  • Explain how events are different from timers.
  • Create interactive programs that use events to respond to the mouse moving
Description

En esta lección continuamos utilizando la entrada del usuario a través del mouse para crear programas interactivos.

Objective

Students will be able to:

  • Explain how events are different from timers.
  • Create interactive programs that use events to respond to the mouse moving.
Description

En esta lección, los estudiantes aprenderán cómo usar teclas de teclado para controlar los eventos. Captura de eventos del teclado cuando el usuario presiona las teclas en el teclado. Esto permite a los estudiantes escribir programas que tomen aportes del teclado para cambiar lo que está sucediendo en el programa.

Objective

Students will be able to:

  • Explain how events are different from timers.
  • Create interactive programs that use events to respond to the keyboard input.
Description

En esta lección, los estudiantes crearán programas que combinen múltiples ideas de esta unidad.

Objective

Students will be able to:

  • Synthesize the skills and concepts learned in the Animation and Games unit to create advanced, interactive programs.
Description

En esta lección, los estudiantes revisan el contenido con un cuestionario de 25 preguntas al final de la unidad.

Objective

Students will be able to:

  • Prove their knowledge of various concepts in animation through a multiple choice quiz
Description

En esta unidad, los estudiantes sintetizarán todas las habilidades y conceptos aprendidos en la unidad de animaciones para resolver rompecabezas cada vez más desafiantes.

Objective

Students will be able to:

  • Define a problem in their own words and plan out a solution to the problem
  • Break a large problem down into smaller pieces and solve each of the pieces, then use these solutions as building blocks to solve the larger problem
  • Utilize the proper control structures to create general solutions
  • Write clear and readable code using timers, events, control structures, functions, decomposition, and comments
Description

En esta unidad, los alumnos reunirán todo lo que han aprendido en el curso para crear un juego totalmente funcional.

Objective

Students will be able to:

  • Synthesize the skills and concepts from Java Script Control Structures, Functions and Parameters, and Animation and Games to create their very own Breakout game from scratch!
  • Break down a large problem into smaller parts using Top Down Design, and solve each of these smaller parts using functions
  • Create helpful comments with preconditions and postconditions to help the reader understand the code
  • Find and fix bugs in large programs
Description

En este módulo de programación final, los estudiantes reunirán todos los conceptos aprendidos a lo largo del curso para crear un programa de su elección. Trabajarán con socios o en grupos para desarrollar creativamente un programa de su elección.

Objective

Students will be able to:

  • Synthesize concepts and skills learned in the course to create their own final project.
  • Scope their project (eliminate features that aren’t necessary) so that it fits in the timeframe allotted.
  • Present their project to their classmates and talk about how the project was developed.