Please enable JavaScript to use CodeHS

Introducción a la ciencias de la computación en JavaScript (Corgi)

Description

En esta lección, se les presenta CodeHS a los estudiantes y se les enseña 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 el mundo de Karel. También aprenden sobre las paredes del mundo de Karel, las instrucciones que puede seguir Karel y cómo identificar una ubicación en el mundo de Karel usando filas y columnas. En estos ejercicios, los estudiantes comenzarán a ver las limitaciones de los comandos de Karel. Además, 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 turnRight?

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 Row, Column terminology
Description

En esta lección, los estudiantes aprenderán a crear sus propios comandos con Karel definiendo y llamando a 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 usarlas 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 comprenderán con mayor profundidad las funciones, ya que aprenderán sobre la función “main”. Esta función ayuda a organizar la legibilidad del código creando un lugar designado donde se puede almacenar el código que se ejecutará en un programa:

function main(){
   turnRight();
}

function turnRight(){
   turnLeft();
   turnLeft();
   turnLeft();
}

main();
Objective

Students will be able to:

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

En esta lección, los estudiantes aprenden sobre el diseño descendente y la descomposición. El diseño descendente es el proceso de dividir un problema grande 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 a diseñar sus programas incluyendo comentarios. Los comentarios permiten a los estudiantes dejar notas en su programa que los demás podrán leer con mayor facilidad. Los comentarios se escriben en inglés simple.

Ejemplo de comentarios sobre el código:

/*
 * comentarios de varias 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 conocen a Super Karel! Como los comandos turnRight() y turnAround() se usan tanto, los estudiantes no tendrán que definirlos en cada programa. Conozcamos a SuperKarel. SuperKarel es igual a Karel, excepto que SuperKarel ya sabe cómo girar a la derecha y darse vuelta, ¡así que los estudiantes ya no tienen que definir estas 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 los for loops en sus programas. Un for loop permite a los estudiantes repetir una parte específica del código un número determinado de veces.

Los for loops se escriben de la siguiente manera:

for(let 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 “if”. El código dentro de una “declaración if” solo se ejecutará SI la condición es verdadera.

if (frontIsClear()) {
    // El código se ejecutará solo si la parte frontal está despejada
}
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, las declaraciones “if/else”. Estas declaraciones permiten a los estudiantes hacer una cosa si una condición es verdadera, y otra cosa si ocurre lo contrario.

Las declaraciones if/else se escriben de la siguiente manera:

if (frontIsClear()) {
      // código que se ejecutará si la parte frontal está despejada
 } else {
      // código que se ejecutará en caso 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 conocen un nuevo tipo de loop: los while loops. Estos permiten a Karel repetir el código mientras una determinada condición es verdadera. Los while loops permiten a los estudiantes crear soluciones generales a problemas que funcionarán en varios mundos de Karel y no solo en 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 a indentar 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 aprenden a combinar e incorporar las diferentes estructuras de control que han aprendido para 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 realizan una práctica adicional con las estructuras de control. Además, seguirán viendo las distintas formas en que los if, if/else, while y for loops 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 repasan el contenido con una prueba de la unidad de 25 preguntas.

Objective

Students will be able to:

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

En este módulo, los estudiantes sintetizarán todas las habilidades y conceptos aprendidos en el módulo de Karel para resolver rompecabezas de Karel cada vez más complejos.

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 a imprimir mensajes en la consola utilizando el comando de Javascript console.log().

Objective

Students will be able to:

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

En esta lección, los estudiantes aprenden a asignar valores a variables, manipular los valores de dichas variables y usarlos en las declaraciones del programa. Esta es la lección introductoria sobre cómo los datos pueden almacenarse 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 dichos datos de manera adecuada.

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 qué es la programación en pareja, por qué se usa y los comportamientos apropiados de un “driver” y un “navigator”.

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 lección, los estudiantes aprenderán cómo la aleatorización puede mejorar un programa.

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 aprenderán a crear funciones básicas a través de JavaScript y usarlas para mejorar la organización, la legibilidad y el flujo de sus programas.

Objective

Students will be able to:

  • Define JavaScript functions
  • Call JavaScript functions within the main function
  • Use functions in order to manage the flow of their programs
  • Increase the readability and organization of their code using functions
Description

En esta lección, los estudiantes repasan el contenido con una prueba 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 sobre el lienzo de gráficos y su sistema de coordenadas. Los estudiantes explorarán cómo crear y ubicar figuras en cualquier lugar del lienzo. La creación de gráficos se basa en establecer el tipo de figura, el tamaño, la posición y el color en el lienzo del artista antes de agregarlos a la pantalla.

Objective

Students will be able to:

  • Understand the coordinate system of the canvas
  • Create basic shapes like circles and rectangles
  • Position shapes in specific locations on the canvas
  • Learn how to add color to shapes
  • Understand how the debug mode functions and how to turn it on or off
Description

En esta lección, los estudiantes practicarán más con los objetos gráficos. También aprenderán a encontrar imágenes en Internet y usarlas en sus proyectos. Las imágenes web pueden cargarse en un proyecto de gráficos a través de la clase WebImage, pasándoles una dirección web y cambiando su tamaño a través del método setSize. Además de cargar imágenes y cambiar su tamaño, los estudiantes también aprenderán a agregar objetos de texto al lienzo.

Objective

Students will be able to:

  • Add images to their graphics projects using WebImage
  • Resize image objects using setSize
  • Display text on the canvas
  • Break their code into functions based on objects to be rendered
Description

En esta lección, los estudiantes explorarán más a fondo la ubicación de sus gráficos y la importancia del orden en que se llama a las funciones.

Objective

Students will be able to:

  • Strategically position shapes anywhere on the canvas
  • Break their graphics projects into manageable functions
  • Order their function calls in the main function correctly
Description

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

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. Estos se refieren a un valor que es verdadero o falso, y se usan para comprobar 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 aprenden sobre las declaraciones if como una forma de tomar decisiones y ejecutar un código específico según 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 estudiantes aprenderán sobre los operadores lógicos. Los operadores lógicos permiten a los estudiantes conectar o modificar las expresiones booleanas. Los tres operadores lógicos son los caracteres !, ||, &&.

  • ¡! = NO
  • || = O
  • && = 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 los operadores de comparación. Estos 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 aplicarán sus conocimientos de las declaraciones if/else en los programas de gráficos. También aprenderán a usar las declaraciones else if para verificar varias condiciones.

Objective

Students will be able to:

  • Write graphics programs with conditionals
  • Use else if statements to check for multiple conditions
Description

En esta lección, los estudiantes explorarán los while loops y las variables de JavaScript. Esto combina las nociones 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 y medio. Un loop y medio es una forma específica de escribir un while loop con una condición que es ‘verdadera’. Dentro del loop, los estudiantes usan una declaración “break” para salir del loop cada vez que se cumple esa condición, lo que hace 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
Description

En esta lección, los estudiantes aplicarán sus conocimientos de los while loops en los programas de gráficos.

Objective

Students will be able to:

  • Write graphics programs that use while loops
  • Use variables to update the position and size of graphics objects within a while loop
Description

En esta lección, los estudiantes aprenderán con mayor detalle sobre los for loops. Estos loops en JavaScript se escriben y ejecutan de la misma manera que los ejercicios de Karel, excepto que los estudiantes aprenderán a modificar la declaración de inicialización, la declaración de prueba y las declaraciones 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 aplicarán lo que han aprendido sobre los for loops en programas de gráficos.

Objective

Students will be able to:

  • Create graphics programs with for loops
  • Use i to position graphics objects and change the size of graphics objects
  • Compare and contrast while loops and for loops
Description

En esta lección, los estudiantes repasan el contenido con una prueba 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 complejos.

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 ampliarán su uso de las funciones aprendiendo e implementando parámetros.

Objective

Students will be able to:

  • Explain the use of parameters and arguments
  • Create functions that take in parameters as input
  • Use parameters to generalize functions and reduce repeated code
Description

En esta lección, los estudiantes aprenden sobre las declaraciones “return” y cómo usarlas para enviar información entre funciones.

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 aprenden a establecer valores predeterminados para los parámetros de su función.

Objective

Students will be able to:

  • Understand the role default values can have in a function.
  • Set default values for their parameters.
  • Properly set the order of parameters and the default values.
Description

En esta lección, los estudiantes explorarán el ámbito 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 repasan el contenido con una prueba de la unidad de 15 preguntas.

Objective

Students will be able to:

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

En esta unidad, los estudiantes sintetizarán todas las habilidades y conceptos aprendidos en el módulo de funciones para resolver rompecabezas cada vez más complejos.

Objective

Students will be able to:

  • Synthesize the skills and concepts from the The Canvas and Graphics, Control Structures, and the Functions modules 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 conocerán el concepto de usar temporizadores para animar sus gráficos.

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, los estudiantes practicarán más con los temporizadores a medida que aprenden a detenerlos cuando se cumpla una condición específica.

Objective

Students will be able to:

  • Create programs with timers to create increasingly challenging animations
  • Stop animation timers when a condition is met using stopTimer() function
Description

En esta lección, los estudiantes aprenden sobre la lógica necesaria para implementar su propia funcionalidad de detección de colisiones en sus animaciones gráficas.

Objective

Students will be able to:

  • Understand when objects “collide” with the canvas walls and other objects.
  • Write their own collision detection logic.
Description

En esta lección, los estudiantes aprenden a detectar un evento clic del mouse y realizar acciones tras el mismo.

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 a extender los eventos del mouse para hacer animaciones interactivas utilizando el movimiento y el 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, los estudiantes aprenderán a usar teclas del teclado para controlar los eventos. Los eventos del teclado captan cuándo el usuario presiona las teclas del teclado. Esto permite a los estudiantes escribir programas que tomen la acción del teclado para cambiar lo que ocurre 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 repasan el contenido con una prueba del final de la unidad de 25 preguntas.

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 complejos.

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 estudiantes pondrán en práctica todo lo que han aprendido en el curso para crear un juego completamente funcional.

Objective

Students will be able to:

  • Synthesize the skills and concepts from Control Structures, Functions, 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 pondrán en práctica todos los conceptos aprendidos a lo largo del curso para crear el programa que elijan. Trabajarán en pareja o en grupos para desarrollar creativamente el programa que elijan.

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.