<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>behindthecodes.com &#187; Education</title>
	<atom:link href="https://behindthecodes.com/blog/category/education/feed" rel="self" type="application/rss+xml" />
	<link>https://behindthecodes.com</link>
	<description>Programming, web design, gadgets, and anything beyond</description>
	<lastBuildDate>Fri, 24 Jan 2014 16:45:28 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Practice makes perfect: Basic algrebra spreadsheet</title>
		<link>https://behindthecodes.com/blog/2011/02/practice-makes-perfect-basic-algrebra-spreadsheet-164</link>
		<comments>https://behindthecodes.com/blog/2011/02/practice-makes-perfect-basic-algrebra-spreadsheet-164#comments</comments>
		<pubDate>Mon, 07 Feb 2011 04:30:51 +0000</pubDate>
		<dc:creator><![CDATA[behindthecodes.com]]></dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://behindthecodes.com/?p=164</guid>
		<description><![CDATA[One adage that I keep telling myself is as stated in the title above: Practice makes perfect. Want to be good at computer programming? Practice! Want to be good in writing articles? Practice! Want to be good at web development? Taking picture? Problem solving? Practice, practice, practice! And with my son studying first-grade math now, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>One adage that I keep telling myself is as stated in the title above: <b>Practice makes perfect</b>. Want to be good at computer programming? Practice! Want to be good in writing articles? Practice! Want to be good at web development? Taking picture? Problem solving? Practice, practice, practice!</p>
<p>And with my son studying first-grade math now, the same maxim holds true to him as well&#8212;&#8221;Practice makes perfect, son,&#8221; I keep telling him.</p>
<p>Don&#8217;t get me wrong; he is good a math. In fact, he is a <a href="http://www.cde.ca.gov/sp/gt/" target="_blank">GATE</a> student, an avid reader with a keen interest for scientific facts, and a future ocean animal scientist slash doctor slash inventor, whatever his final decision be. But still, silly math mistakes happen, and one way to prevent it is to practice more. I had him done more additions and subtractions, and I <b>DO</b> see the result of the drill.</p>
<p>So what tool did I use? Just a simple Excel sheet printout! With formulas, of course&#8212;this is a perfect &#8216;practice&#8217; opportunity for me too, don&#8217;t you think?</p>
<p><a target="flickr" href="http://www.flickr.com/photos/behindthecodes/5425592495/" title="Basic math worksheet by behindthecodes.com, on Flickr"><img src="http://farm6.static.flickr.com/5214/5425592495_230c721a6c.jpg" width="487" height="500" alt="Basic math worksheet" /></a></p>
<p><span id="more-164"></span></p>
<p>You can download the Excel file <a href="http://behindthecodes.com/demo/Basic_math_worksheet.xlsx">here</a>. Print it out (trust me&#8230; it will be easier for your kids to write down the results), refresh the calculation (using F9) or reload the file, and repeat. You can also change the parameters (number of digits, and whether you want the second number to start from 0 or not) to suit your kids&#8217; needs.</p>
<h3>The formula</h3>
<p>First thing first: Given n as a positive integer, how can we get a list of positive n-digit numbers? Simple: <b>by using the power of 10</b>, the numbers will be from 10<sup>n-1</sup> to 10<sup>n</sup>-1. For example, a list of <span style="color: red">2</span>-digit numbers will be from 10<sup><span style="color: red">2</span>-1</sup> to 10<sup><span style="color: red">2</span></sup>-1, or from 10 to 99.</p>
<p>In Excel-speak, this is accomplished using <b><a href="http://office.microsoft.com/en-us/excel-help/raise-a-number-to-a-power-HP003056139.aspx" target="_blank">POWER</a></b> function, where the first parameter is the &#8216;base&#8217; number (to be powered), and the second parameter is the power<sup>*</sup>. So for our example above, we can use the formula POWER(10, <span style="color: red">2</span>-1) and POWER(10, <span style="color: red">2</span>)-1, respectively.</p>
<p><sup>*</sup> Please note that Excel also provide a <b>^</b> operator you can use intead of the <b>POWER</b> function, ie. a^b is the same as POWER(a,b). However, for the sake of functional clarity, I chose to use <b>POWER</b> function in this article. If you chose <b>^</b> operator, go ahead, it will produce the same result, and you&#8217;ve earned +1 Coding Achievement along the way! <img src="https://behindthecodes.com/blog/wp-includes/images/smilies/icon_biggrin.gif" alt=":D" class="wp-smiley" />  </p>
<p>Next, having the list of numbers with n digits, how can we pick a random number out of it? <b><a href="http://office.microsoft.com/en-gb/excel-help/randbetween-HP005209230.aspx" target="_blank">RANDBETWEEN</a></b> to the rescue! Simply provide the lower and upper bounds as its first and second parameter, and this Excel function will happily return us a random number (integers) between those bounds. So far so good?</p>
<p>Alright, so we get the first/initial number of our algebra problem. How to generate the second number?</p>
<p>Again, let&#8217;s tackle the easy part first. For addition problems, we can use the same <b>RANDBETWEEN</b> formula as the first number above. Or, if you prefer to have a random number from 0 to n-digit, then we simply supply 0 in the first parameter. That&#8217;s it.</p>
<p>How about subtraction problem? Again, use the <b>RANDBETWEEN</b> formula. But since I assume basic math students don&#8217;t get the concept of negative numbers yet, this time the random number&#8217;s upper bound must be as high as the first number. In other words, if the first number is <span style="color: red">X</span>, then the second number must be between 0 to <span style="color: red">X</span> (if we want to start from 0).</p>
<p>Wait&#8212;but how can we tell Excel to choose randomly between addition and subtraction? If you&#8217;ve come up this far, you should remember that one formula we keep using over and over: The Mighty <b>RANDBETWEEN</b>!!! We can simply ask His Majesty to generate a number between 0 and 1, then treat 0 as subtraction and 1 as addition. This is an Excel-ent way of doing a functional coin flipping, pun intended :D.</p>
<p>So let&#8217;s wrap them all up. With the help of the <b><a href="http://office.microsoft.com/en-us/excel-help/if-HP005209118.aspx" target="_blank">IF</a></b> function, we can compose an expression like this:</p>
<pre><strong>=IF(RANDBETWEEN(0,1) = 0, "- " &#038; RANDBETWEEN(<span style="color: red">A</span>,<span style="color: red">B</span>), "+ " &#038; RANDBETWEEN(<span style="color: red">A</span>,<span style="color: red">C</span>))</strong></pre>
<p>Where:</p>
<ul>
<li><span style="color: red">A</span> is the lower bound of the problem number, ie. whether starting from 0 or from the first n-digit positive number,</li>
<li><span style="color: red">B</span> is the first number of the subtraction problem, so the calculation won&#8217;t involve negative results, and</li>
<li><span style="color: red">C</span> is the upper bound of the addition problem, ie. the last n-digit positive number.</li>
</ul>
<h3>The spreadsheet</h3>
<p>Again, you can download the Excel file <a href="http://behindthecodes.com/demo/Basic_math_worksheet.xlsx">here</a>. Study it well, grasshopper, as this is one way to practice your Excel-fu. Remember: <b>Practice Makes Perfect</b>!</p>
<p>Questions? Problems? Leave a comment and I’ll try my best to help.</p>
]]></content:encoded>
			<wfw:commentRss>https://behindthecodes.com/blog/2011/02/practice-makes-perfect-basic-algrebra-spreadsheet-164/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
