Showing posts with label #codemaths. Show all posts
Showing posts with label #codemaths. Show all posts

Friday, May 22, 2015

#codemath: Student created code on simplifying square root expressions

Today as an extension activity for students that have already mastered simplifying square root expressions, I offered students a chance to complete a symbolic example using my #codemaths structure.

Here was the minimal prompt given to students in a unit google document:
Fill in the gaps in the worked out solution in this #codemaths project
I gave a short explanation of how the variable "a" is randomly generated and when they type [a] it will output that value instead of the letter "a". (I recently switched from <a> to [a] to allow for simple html formatting to be used in code output. <b></b> for bold, etc.)
Students only needed to "fill in the gap" of the potential worked out solution from their perspective on how they would solve it--filling in enough detail that would help a fictional struggling student viewing it as a potential worked out solution.

The existing code in the worked out section looks like this:

And will print out:

For the sake of not giving away the solution to the problem, I will just share screenshots of the student output from the #codemaths worked out solutions they wrote and emailed to me:

"Remember to give credit to the makers!!!"--Melissa and Katelyn
"Here mr. schwen this is my super awesome code"--Ken
Pretty fun application for the kids and little time is spent explaining writing code because of the simplified process and kids are thinking more deeply about the mathematics embedded in an activity like this at a pretty highly symbolic level.
One student, wide-eyed and excited, said to me after getting his to work that "This is really fun!" I like too that there is a trial and error aspect to this as they refine and revise what they think will output and what actually does show up when they test it out.
In all honesty, not all my students are doing this but for the kids that are ready for it, it turned out to be a great discussion and application of where we had been in our mathematics and a good preview as to how math can be used in an increasingly more coded world.


Thursday, April 23, 2015

#codemaths:Programming math practice for students

//Checking in

I feel like I need to start the first paragraph of every post with a quick paragraph for those who will judge my whole classroom based on one blog post (not that anyone has every voiced judgement but I don't want to give the wrong impression either). As part of any good math classroom I believe there needs to be a balance of conceptual development, investigation and then, in turn, developing mathematical fluency and efficiency. This post will focus on how I am using computers to develop efficient math students, and will not focus on the conceptual development that has taken place prior to students doing this practice work (think textbook problems).

//Learning Cycle, Conversations and Self-Reflection

I have chromebooks in my classroom, two students to each device, which I actually love in promoting math conversations and collaboration. If offered one device for every student I'm not even sure that I'd want it as an option...seriously. I've spent many (seriously, MANY) more hours than I care to admit developing an electronic form of practice for my classroom that works for my situation and I feel like I'm at a new place personally, thus this blog post.
A few years back I was doing the traditional assign homework, quiz the students and look at the data myself. Big Data in education, we all know the drill. I had all kinds of charts and electronic analyzing going on but I was doing all the analysis, not the kids, and it was after the learning cycle was to have been completed. There are actually quite a few blog posts and processes I've written on electronic student data that I'm actually not even doing now in my own classroom now.
I dabbled in writing rubrics for each learning target for my students which I really actually liked but, for the sake of time and curriculum development, that has been pushed to the back-burner and saved for a year when my course content has fewer changes. In class we don't have "homework" but "practice" and as it is electronic there is an unlimited amount available to students at any time, along with help videos that are an option for kids wanting to review where we've been.
We have dedicated class time for practice (example here) and it keeps individual learners at the focus rather than the pace of the whole class. I actually think it's tragic to hear that many 12, 13 and 14 year old kids are having to do 3-5 hours of homework every night before bed rather than spending time with their family and I don't want to be a contributor to that any longer.
I've done the whole clicker thing and what I didn't like with that was there was a lot of down-time and waiting and a lot more focus on the right answer than the process and conversations. Maybe that's because we were gathering data and in education we want it to be "valid" and "formative". No thanks, I'd rather have my kids talking about the math they are wrestling with than getting pure data from them.
Properties of Exponents Review

//codemaths

I've written some about this in the past and wanted to highlight some of the changes I've put together. I'm presenting on this at the NCTM Regional Conference in Minneapolis, Fall of 2015 from both a teacher perspective as well as using it as a tool to challenge students to think more deeply about the math concepts they are learning while applying them in a pseudo-code environment. I tried going full-blown javascript with a class a few years ago and realized so much time is lost in so many of the small details of just writing code that we would never ramp up soon enough to get to applying the math we were currently learning. Today for example in class I found a couple of side-tracked girls that had clicked on the code link from a practice set they were working on and I think I have them hooked on a code challenge to write a system of equations and an algebraic solution based on three randomly generated variables.

//Screen

Kind of a sneaky teacher thing but I have it programmed to go through a subtle gradient of background color (starting at white). If a student continues to get consecutive questions correct their screen will move through shades of green toward blue. As they get consecutive questions wrong it will move through through yellow shades toward red. For a student looking directly at the screen they may not even notice it but as I'm walking around the room it is easier to see and it helps as a visual cue even from across the room for me to go check in with a pair of students if they aren't already calling for help.

//Stars

Far from gamification but after a set number of correct questions, based on quantity and percent correct they can get 1, 2 or 3 stars to show up. It doesn't save to their profile, record it anywhere or even go in as a grade book but it's laughable at how that actually motivates some kids to try harder and not rush through their thinking. Occasionally I'll hack my own code and pictures of my face will show up as they get more questions right. I thought it was funny--some thought it was creepy but deep down I think that means it's awesome so I keep doing it.

//Auto Math Formatting

This has been the latest project with many times where I almost gave up and it turned out I had literally one character in the wrong "else if" loop. I didn't want students to get hung up on understanding what 2x^3 represented mathematically so after the code is printed it will go through and format text (like in in the image above) as 2x³ while also formatting fractions and subscript labels, all based on order of operations so 1/2x will be 
shown differently than 1/(2x) for example. As students type their responses in a text box they will also see a math 
formatted preview of what they are entering.

//Makers

I've tried hard to make this all in a way that can be shared and duplicated but I recognize at this level you really need to have some level of javascript understanding to make something like this work for you. What I've found to be true for me though is that it has become easier for me to make specifically what I need for a lesson rather than trying to find something that is close to what I need. Here's a link to a getting started guide I've put together and I'd appreciate any feedback if there are steps or parts of the process that are confusing. I can't believe you've read this far, you must be pretty nerdy too.

Monday, April 28, 2014

#codemaths: Mathish generator


I realize there are things out there like this that are much better but with our exponent unit coming up I wanted my students to be able to see what they were typing using the "^" to denote exponential form and I wanted order of operations to be considered with how they were typing it in the preview. In our practice material (here for example) I have it set up to preview as kids type. It can also be copied and pasted into a document if I wanted to use what I have typed for a quiz of some sort instead of using an equation generator that is sometimes hard to format (or is a picture in some cases).

Here is the link to the work in progress.

I've been thinking for future in wanting it to format complex fractions but have run into a limitation with Google Apps Scripts in not allowing the <u> tag in html or for me to specify what sides of a cell to show a border. I have a hard time believing this would cause a security risk for them but they do not seem to allow that at this time.

**An update as of 5/20/15 now includes fractions with exponential and radical expressions if you type sqrt to represent the square root symbol. Formatting and appearance is still based on order of operations.**

Friday, March 21, 2014

#codemaths: Considering different solutions as variables change

A symbolic extension to our current learning in class
I presented this as a challenge for my students today that were ready to move on from the review that others were still doing in class. All students worked on the initial question and a handful moved on to try to program the solution in #codemaths. I was happy to see that a couple of my female students were working on this and I talked to them about the movement to try and get more girls into programming in what is typically seen as a male career path--they thought that was pretty cool.

Here is the example the class worked on and the skills I went over to prepare students for what they would need to do in order to connect the Javascript to the mathematics they were applying:

What is the solution to ax+b≥c where a, b and c are any value? Are there any circumstances that cause your solution to be different?

Javascript skills needed: using the eval() function and joining a string with variable expressions.

Joining strings with variable values:
“This sentence includes the value “+b;
displays as
“This sentence includes the value 3”
when b = 3.

Using the eval() function:
You can do math using the eval() function as well:
“x>”+eval(a*b-c)
would display as
“x>-1”
when a=1, b=2 and c=3.

In this #codemaths challenge, you will want to change the variable ‘solved’ in the constraints section to output a correct solution for any inequality that may result for random variables a, b and c that is programmed in the question section.
Notice in the first line of code
if(a==0){a = 3;}

that a will be changed to 3 if it is ever equal to 0.

Tuesday, February 25, 2014

#codemaths: algebra functions and image URLs

I've added some function (for my own benefit really) that saves time in anticipating many scenarios in generating random questions--reduce() and coeff() functions using the #codemaths application.

When used, the reduce function can simplify fractions. For example, for random variables a and b, reduce(a,b) would simplify a=4 and b=1 to 4 and a=2 and b=4 to 1/2. It is still your job to make sure b is not zero with the constraints.

The coefficient function allows expressions to be simplified--most helpful for anticipating the best final answer. There are some specific options to differentiate how it is used.
If I have the expression ax+by=c using random values for a,b and c (again making sure 'a' and 'b' aren't zero in the constraints), if I use the coeff function I can programmatically simplify the scenario 1x+-4y=5 to x-4y=5. 
To code it you need to use "lead" for a coefficient like a that is the lead coefficient in the expression and "constant" if a term you want to simplify is just a constant term with no variable. 
In the example above you would code <coeff(a,"lead")>x<coeff(b)>y=<c>. In this case you don't need the "constant" or coeff fuction for c. The equation 1x+-1y=3 would simplify to x-y=3.
That could be used in this example however: ax+b=c: <coeff(a,"lead")>x<coeff(b,"constant")>=<c>. The equation 1x+-1=3 would simplify to x-1=3.
You can also now use a url of an image to be included in a question such as this one:


Tuesday, December 3, 2013

#codemaths explained: Made to test and share code easily with students


I've since added some functionality to the #codemaths platform that will allow for easier exploration for students and some quicker editing for me (video). As I move into working with tables and graphs on a more regular basis I wanted a way to be able to display either or both of them in a question without having to recode it each time. Through the use of checkboxes a graph and/or associated table can be displayed alongside a question. I also have it set to automatically provide a link to the code (if a student gets the question wrong) so students can look under the hood of each practice question that I make for them and learn from seeing examples of working 'code'. In this example you can see the use of creating an array and sorting it so that the listbox choices are randomized a bit so the correct answer is not always in the same place.
I've also tweaked the code export a bit to be more stable so it really is just a cut and paste for me to build a question set to be used in the practice part of our learning cycle. This has been a really fun project for me as it has developed. As always I'm trying to take out some of the technical stuff so that it is more accessible to other teachers wanting to dabble in it.
To build question sets using custom code, check out this post.