Tuesday, February 20, 2018

Curricular Coding Infusion


According to Emily Hayden, "Learning code requires thinking and encourages curiosity" (2016). It is a form of engineering with planning, problem solving, and tons of trial and error.   Coding even offers that "gaming" or "level up" feeling when the finished product executes correctly.  Teachers will often hear those delightful words shouted aloud -"I got it!" and "It works!"  

Additionally, "Computer-related jobs are expected to grow at the faster-than-average rate of 12 percent through 2024, according to the Bureau of Labor Statistics (BLS). The BLS also reports that the median annual salary for these professionals in 2015 was $81,430, which was more than two times the average for all occupations.  This figure has been increasing!

So, how do we make coding more accessible to students?

The answer is by infusing the curriculum with coding!

Mr. Thomas' 7th grade math students, at Crain's Creek Middle School, enjoyed putting their knowledge of complimentary and supplementary angles to the test today while infusing a little Python Coding.  The programming even progressed to include a little introduction to artificial intelligence! 



Using the website Trinket, students started with a basic code, which drew a 90 degree angle.  

This was the code:

from turtle import *

turtle1 = Turtle( )

turtle1.forward(100)
turtle1.left(90)
turtle1.forward(100)


Then, they were asked to write a program, which drew a 40 degree angle.

Students tried different coding combinations.  The first thought was to simply change the 90 to a 40.  Using the Desmos Angles Site in conjunction with their coding attempts, they soon discovered that this did not work.  Students realized that they needed to think of their initial line as 180 degrees 
(a straight line).

Students' hands flew in the air as they realized many different iterations, which achieved the desired outcome.

Some examples included:


from turtle import *

turtle1 = Turtle( )

turtle1.forward(100)
turtle1.left(140)
turtle1.forward(100)

from turtle import *

turtle1 = Turtle( )

turtle1.forward(100)
turtle1.left(180-40)
turtle1.forward(100)

from turtle import *
turtle1 = Turtle( )
turtle1.backward(100)
turtle1.left(40)
turtle1.forward(100)

Then, students experimented with a "magic function machine" code, which allowed them to choose any angle they wanted and the computer would draw it automatically.

Students realize that functions in coding made the code easier and involved less typing!

This is the start to understanding abstraction
a very important term in computer science!


       




Finally, students experimented with a little "artificial intelligence."

If you would like to test out this code, please click HERE and have fun!

Happy Coding!





No comments:

Post a Comment