Please enable JavaScript to use CodeHS

Coding in Science

Description

In this lesson, students begin to dive deeper into our current understanding of the gravitational force.

Objective

Students will be able to:

  • Identify why objects fall to the earth.
  • Explain the similarity between an object orbiting the earth and an object falling to the earth.
  • Explain what a force is.
Description

In this lesson, students explore the value of simulations in science, learn their first JavaScript concepts, and start to build their gravity simulation.

Objective

Students will be able to:

  • Explain how simulations can be used in science, as well as their pros and cons.
  • Understand the basic idea of functions and variables in JavaScript.
  • Write their first functions and variables in JavaScript.
Description

In this lesson, students learn what it means to scientifically test variables in an interaction, then use their gravity simulation to examine which variables affect the force of gravity.

Objective

Students will be able to:

  • Scientifically test variables in an interaction.
  • Use their simulation to test variables and print data.
  • Use observational and empirical evidence to make conclusions.
  • Explain which variables affect the force gravity.
  • Summarize their process and results in a written conclusion.
Description

Students will use Python to create a screen with four pieces of text placed on the canvas.

Objective

Students will be able to create and position simple graphics on the canvas in order to begin programming a Punnett Square generator.

Description

Students will learn about variables, user input, and string indexing in order to print user defined allele values to their canvas.

Objective
  • Students will be able to use the value of a variable to control parts of their code in order to write more reusable programs.
  • Students will be able to get input from the user and index the string in order to use this information in their program.
Description

Students will learn how functions can be defined and called to complete a task.

Objective

Students will be able to use functions and string indexing in order to fill in the genotypes resulting from the user inputted allele values.

Description

Students will use if/else statements to alter their printGenotype function so the dominant allele (capital letter) is always printed first if there is one.

Objective

Students will be able to use if/else statements in order to make sure that the dominant allele in any resulting genotype is printed first if one exists.

Description

Students will learn how to use logical operators to determine if a genotype contains a dominant allele.

Objective

Students will be able to use logical operators in order to calculate how many genotypes contain dominant alleles.

Description

Students will make the information given by their Punnett Square generator easier to understand by adding text components around the dominant genotype percentage.

Objective

Students will be able to apply many of the programming concepts they’ve learned up to this point in order to create a Punnett Square generator that gives easy-to-digest, important information.

Description

Students will use JavaScript to create a screen with two different colored circles placed in different locations on the canvas.

Objective

Students will be able to:

  • create and add simple graphics to the screen in order to begin programming a collision simulation.
Description

Students will learn about variables and will use them to control the radius of their circles.

Objective

Students will be able to use the value of a variable to control parts of their code in order to write more reusable programs.

Description

Students will create functions to move the two circles on the screen in opposite directions.

Objective

Students will be able to use functions, timers, and the move command to add movement to their circles in order to begin adding needed motion to their simulation.

Description

Students will alter the given code so that upon collision, the objects will move in opposite directions than initially. They will also see how differing the value given to the speed variable will change the movement.

Objective

Students will be able to change the direction of movement of each circle upon collision in order to begin the first steps toward studying the collision that occurs.

Description

Students will use the assigned variables with the conservation of momentum equation in order to control the final speed used in their simulation.

Objective

Students will be able to alter the final speed upon collision in accordance with the conservation of momentum equation in order to create a more realistic collision simulation.

Description

Students will use conservation of momentum and conservation of kinetic energy equations to control the final speed of each object in an elastic collision.

Objective

Students will be able to manipulate conservation of momentum and conservation of kinetic energy equations to control the final speeds of both objects in order to create a realistic elastic collision simulation.