Coding Games to Learn Expressions and Inequalities

megan_b

Before I started our unit on Equations, Expressions, and Inequalities, I asked students if they preferred to learn with lessons and tests, or if they liked projects better. Some of their responses were:

“I like projects better because you can keep working and working until you get it right. Sometimes if you take a test, you get a bad grade and it’s like ‘oh well, there’s that grade down the drain.’ But with a project you get a chance to perfect it.”

“I like projects because you get to work with your friends.”

“I like lessons and tests because I think I learn better when I get to practice a lot.”

“I like projects better because I feel like I really get it when we do a project.”

Most of the responses were very much pro-project, so I made a commitment to do a traditional assessment and also have a creative project on Equations, Expressions, and Inequalities.  My idea for a project came about when a young lady lobbied hard to create computer games:

“Ms. DuPriest, we should all make computer games for a project and then all play them.  It would still be math because we’d be programming!”

Well all right, then. Let’s make math computer games. Creating a computer game is definitely mathematical. Here are the seventh-grade Common Core State Standards that apply.

CCSS 7.EE.A.2 Understand that rewriting an expression in different forms in a problem context can shed light on the problem and how the quantities in it are related. For example, a + 0.05a = 1.05a means that “increase by 5%” is the same as “multiply by 1.05.”

CCSS 7.EE.B.3 Solve multi-step real-life and mathematical problems posed with positive and negative rational numbers in any form (whole numbers, fractions, and decimals), using tools strategically. Apply properties of operations to calculate with numbers in any form; convert between forms as appropriate; and assess the reasonableness of answers using mental computation and estimation strategies.

CCSS 7.EE.B.4 Use variables to represent quantities in a real-world or mathematical problem, and construct simple equations and inequalities to solve problems by reasoning about the quantities.

I have a really difficult time unpacking 7.EE.B.3, which is extremely broad. I have an easier time with the other two standards.  Kids should be able to create equations and inequalities for real-life situations, and they should be able to rewrite expressions to shed light in different contexts.

I decided to have the kids write mini-games like the kind that are on The Price Is Right.  It had so much potential – we could even run a little game show in class, with a host that tells contestants to “Come on Down” and play the students’ games to win fabulous prizes!  I created a rubric and description, and the students and I watched videos of contestants playing TPIR to see what kinds of games were appropriate.

RUBRIC AND DESCRIPTION FOR PRICE IS RIGHT PROJECT

Videos:  Balance Game, Bullseye Game, Grocery Game

In a nutshell, their projects had to meet these requirements.
* Must explain the rules clearly
* Must contain math expressions using variables
* Must use inequalities to test whether a contestant wins or loses
* Must have a paragraph explaining the math in the program, how someone can win, and how someone can lose.

Outside of those requirements, the students really had a lot of freedom to create whatever they wanted.  I teach in a double-block schedule of 89 minutes per class period.  I don’t like using the entire 89 minutes for project work, as it’s hard for the kids to maintain focus on one task for the whole time.  We used 6 or so half-days of 45 minutes each for the kids to work on their projects.  I assigned them into work groups to sit together and collaborate, and overall I liked what this did for their programming. Some kids who had never completed a programming project sought the help they needed and finished one successfully.

The pros of this project:

* Students applied inequalities in a real-world situation through boolean expressions. I really wish boolean logic were introduced in the common core. It may not have seemed like an important part of mathematics before the computer age, but it is now.
* Students gained deeper understanding of variables used in expressions and of the coordinate plane.
* They LOVED creating games. It was really challenging but the engagement was so high. They just thought it was fantastic fun.
* There was quite a lot of learning that went on outside of the standards too. I didn’t expect that algorithmic thinking would be quite as challenging as it was in this little project, but that was the hardest part about it.  It wasn’t doing the math on how to price out 3 gallons of milk and 2 blocks of cheese that was difficult.  It was understanding the breakdown of all the little steps, the algorithm, needed to have a person make their choices, store the choices in variables, do the math on the choices, and then make a comparison in order to see if they won or lost. It was really devilishly hard for many kids to understand creating their own algorithms. As I went through the project, I learned more and more about how to help them by helping less. I started by telling them what to type – and then later developed a flowcharting way of having the students guide me through what they were trying to do in their program.  I will have to play with the flowcharting idea more in the future, because the computational thinking – not the computation itself -really was the biggest challenge, and therefore the biggest gain in learning, with this project.

Some cons of this project:
* I needed to stay realistic that not everyone will learn the same things by doing a project. This is the biggest paradox in our education system today – the knowledge that each student is different in his or her development, background, and motivation – and every student will learn something different from every lesson you teach – but you are held accountable for having every student learn the SAME things.
* That said, some kids wanted to create games that involved really minimal uses of expressions with variables. Or no application of inequalities at all. The games worked and were beautifully written, and clearly learning took place, but I had a requirement that the programs had to use inequalities. Do you force a student to include inequalities when they’re not needed for the implementation of a clever game, just to assess that they know inequalities?  My rubric is pretty straightforward, but I struggled with giving a kid less than a proficient grade for a fantastic program which required a lot of hard work and learning to create.
* The numbers are smaller, but I still have kids who get stuck, stay stuck, and are very shy about reaching out for help. It is still a struggle to move kids along the continuum toward independent problem solving. I suppose that is a universal struggle of life. It’s just amplified when you teach 32 kids in a classroom and there’s no perfect tool for solving it. I did the best I could this time around with structured workgroups and ten-minute mini-sessions. I would signal for the kids’ attention and announce “in three minutes, come to the SMART board for a mini-session on button clicks!” Students would gather around and I’d give them a tutorial.  The next day I might do a mini-session on “if” statements.  These were helpful but not universally so.  I am still looking for tools and strategies and would love suggestions on improving self-efficacy of kids.

Here are some of the better projects created by kids… the creativity and variety in the games was just fantastic, and I loved the work they did.

Gift Card Game by Megan B. Megan’s creative commenting made the game customizable for anyone. She had a great time making the graphics and creating a different screen if you win.

Cookie Clicker by Jake H. A remix of the popular mobile app of the same name. Jake’s version went as viral as it could in the classroom, with every kid in the class clicking the cookie.

Two Player Game by Anna E. A Jeopardy-style game in which you answer quiz questions for money. I loved how she included math expressions by making you solve equations in order to win money for the math questions.

Price is Right by Alison F. A complete package, with challenging math expressions, interactive buttons, and a really user-friendly experience!

Balance Game by Anna R.  Wow. Wow!! Anna wanted to make a game like the Balance Game, but challenged herself to add some randomness to it and make it very unpredictable. The result is really cool and was very challenging to program. Random buttons pop up on the screen, and you have to select the correct two of them that add up to the mystery price.  Anna has quickly become a rockstar programmer in class.  For Christmas she told me her dad bought her a robot and a book about programming in C.  She was extremely excited.

The students submitted their game via a Google Form along with some feedback for each other and for me.  I want to leave you with a quote from Katie T. about this programming assignment.

“I usually do not like the other stuff we did with programming but I thought the way this was set up and they way my game turned out was just awesome. I hope you can do something next year with the students you have. I definitely hope you take this feedback in consideration because I really enjoyed the project and I am sure that the kids in the future will too! ”

I think I’d be a fool not to take her up on that – wouldn’t I?

Tags: , , , ,

About dupriestmath

I'm a former software engineer who has taught middle school math and computer science for the past 6 years. I believe every kid has the right to be a thinker. I started this blog to save resources for integrating programming in the Common Core math classroom. I also use it to save my lessons and reflections from teaching budding computer scientists! Coding has transformed how I teach and think. You'll love what it does for you. You should try it.

Leave a comment