# When you tutor math, the world brings an endless bounty of numerical comparisons. This specific one has not arisen during tutoring; yet, it might be the kind of summer distraction  a reader seeks.

Whether you are buying gasoline, or diesel, or electricity, you are buying energy. To develop perspective on society’s direction towards electric power, somewhat away from fossil fuels, one might ask, “What are the comparative prices of these sources of energy?”

Without doing any math, the sensible conclusion is that electricity is the cheapest form of energy. If it wasn’t, then private citizens would be tempted to buy generators to produce their own electricity. Yet, they don’t seem to be so tempted. Private citizens seem only to use generators when they don’t have access to “line” power. Such contexts are blackouts or remote camps.

Industry prefers diesel over gas, so it’s logical to conclude that, between the two, diesel must be a better bargain.

Let’s sharpen our pencils, then seek some confirmation of our suspicions.

Electricity: I’ve searched the net for the price of electricity in markets spread around North America. It seems that 12 cents per kWh is the US average, according to planet money.

Gasoline and Diesel: Wikipedia says that 1 gallon of gas contains around 33kWh of energy, whereas 1 gallon of the diesel at the pump contains around 38kWh. According to the U.S. eia, the “typical” June price for a gallon of gasoline was \$3.69; for diesel, it was \$3.91. From those numbers, the price per kWh for gasoline is \$3.6933kWh=\$0.11kWh or 11¢ per kWh. For diesel, it’s \$3.9138kWh=\$0.10kWh or 10¢ per kWh.

Well, according to the actual numbers, electricity might be the most expensive up against gas or diesel, while diesel, it turns out, is the cheapest. The prices are all potentially volatile; therfore, the comparisons may not turn out the same even next month. Regardless, I’m surprised.

The price comparisons above are “average” for June in the US. In a given local market, they may be different. Here on the BC coast in Canada, gas is around 16¢ per kWh, whereas household electricity works out to around 9¢ per kWh for typical family usage. So here, electricity is the much cheaper form of energy.

We are left with the question of why electricity seems to be gaining ground over fossil fuels, given the lesson above. Come back for more about energy comparisons in the near future. Here, we’re in another heat wave: enjoy the beautiful summer weather, and try to keep cool:)

Source: Fuel Oil, Wikipedia

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

# Tutoring math, you might be asked just about anything to do with numbers.  Here’s a comparison the tutor thinks might interest even the most casual visitor….

My automobile has just matured past its warranty. Though there’s seemingly nothing wrong with it, the idea of replacing it enters my mind now and again. Of course, there are choices now that weren’t viable when I bought this one. Notably, one might buy a hybrid vehicle now. What are the advantages?

Well, I’ve done some very rough calculations by way of comparing the “gas” option with the “hybrid” option. The makers of the Chevy Volt made it easy for me. However, I used Wikipedia as a source. It tells of a “combined” mileage of 62 mpg (or about 100km per 3.8L, if your prefer). From info I’ve picked up around the ‘net, you might expect around 30 to 35 mpg (32.5mpg=52km per 3.8L) from a typical gas-only vehicle, new, that’s around the size of the Volt.

With all the models, options, and deals out there, it’s hard to compare the prices directly. I’d say, though, that on a given day you might pay 1/3 more for the Volt – which could amount to around \$8 or \$9 grand. Let’s go with \$8000 and convert it to mileage. My wife tells me that, today, gas is around \$1.40/L. If, on the new gas-powered car, you get 52km per 3.8L, that means 52km per 3.8x\$1.40 or 52km per \$5.32.  Let’s realize that simplifies very closely to 10km per dollar. Therefore, on the \$8000 you save buying the gas-powered car, you can drive about 80 000km, assuming fuel costs are stable.

These are rough calculations based on simple assumptions.  However, they might well be realistic in many cases.  What these numbers might do is provide some interesting material for the mind to ruminate on during those quiet times sitting outside in the summer warmth….

Look for further exploration of this topic here soon:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

# Tutoring high school math, unit conversions are often visited.  The math tutor discusses the conversion of engine displacements.

Back when I was a kid, I had a 50cc (cc:cubic centimetre, also written as cm3) minibike. My friends soon got an 80cc one. That’s when the numbers “50cc” or “80cc” became important to me: their 80cc bike was not just a minibike. It could go 60mph (we still talked in miles back then); it always had more power than you needed. That was the difference between a “50” and an “80”.

Through many moves, new friends who didn’t ride motorbikes, jobs, then university, I became completely removed from the motorcycle culture. In high school I heard about old muscle cars; a few of my friends even had them. The numbers were “289”, “350”,or “400”. I was told those numbers also described engine size, but they meant cubic inches rather than cubic centimetres. At the same time, more of my friends had smaller cars whose engines were measured in litres: 1.6L, 2.6L, or 3.8L, for instance.

The inevitable question in such a context: what is a 350 cubic inch engine in litres? Or in cubic cm? How can we arrive at a common unit so as to compare the sizes of those engines?

We can do so with the help of this diagram:

It’s a fact that, for a box structure, the volume (aka, displacement) is given by

Volume=length*width*height

Therefore, the volume of the cubic inch pictured above, in cubic centimetres, would be

Volume=(2.54cm)*(2.54cm)*(2.54cm)=16.387064cm^3

Therefore, rounded to the nearest hundredth,
1inch^3=16.39cm^3

It follows that a 350inch3 engine is 350*16.39=5736.5cm^3, or 5736.5cc’s, if you prefer that way of saying it.

Another fact is that

1cm^3=1cc=1mL

Furthermore,

1L=1000mL

Therefore, your 5736.5cc engine is also 5736.5mL, which is 5.7365L.

My old minibike of 50cc? Well, I guess it was 50/16.39=3.05inch^3. For its size, though, it really got around:)

We’ve hit a cool, damp stretch of days here, but we needed it. Wherever you are, hope your summer is turning out well, too.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

# Tutoring high school maths and sciences, unit conversions  are prevalent.  The math tutor offers an example of converting between common units.

Hello: hope your summer is going great. As I’ve implied over the previous few weeks, my activities have shifted from day-to-day tutoring towards maintenance and research.

One focus, particularly since early July, has been repairing my old Lawn-Boy mower. It’s been a true learning experience. A point of interest about the repair/restoration, which also connnects with math, is the notion that, according to the Lawn-Boy service manual, the engine is 3.5 horsepower. Horsepower is an imperial unit, often abbreviated to hp. The obvious question: What is 3.5 horsepower in metric?

Well, to start with, the metric unit for power is the Watt. Most metric units are lower case, but a few are upper case because they are named after people. So it is with the Watt, named after James Watt. The abbreviation for Watt is W.

From the perspective of common processes, a Watt is a very small amount of power. To make the numbers more convenient, many applications use the kilowatt, abbreviated to kW:

1kW=1000W

Now, it’s a fact that, rounded to the nearest whole number,

1hp=746W

Multiplying both sides by 3.5, we get

3.5hp=3.5(746W)=2611W

Now, we divide by 1000 to convert to kW:

2611W/1000=2.611kW

Apparently, to convert from hp to kW, we first mutliply by 746, then divide by 1000. We can combine those two operations and just multiply by 0.746, as follows:

Example: suppose a car is rated at 220 horsepower. What is its power in kW?

Solution:

220(0.746)=164kW, rounded to nearest whole number.

This article has evolved several topics that I’ll discuss in future posts:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

# While tutoring slows down in the summer,  the focus shifts.  Though not an exercise expert, the tutor continues with some of his ideas about it.

Connecting with my last post: I was discussing exercises I’ve gravitated towards, or moved away from, over the last couple of years. Skipping is prominent now, with outdoor running, running up and down stairs, and riding the stationary bike all taking back seats.

Skipping, I rarely get injured. However, in my experience, care needs to be taken not to overdo it. When I haven’t skipped for a while, a couple of minutes at a time is the most I should do, with a couple minutes “walking it out” in between. The danger: the connective tissues in the feet can get overworked without the skipper’s being aware. In such a case, when the muscles cool down, the skipper can be left with a bad strain. It’s happened to me. The same caution applies when I want to increase my skipping duration: I put rest walks in between the minutes I’ve always done and the “new minutes” I’m adding on. I only add a couple of minutes at a time.

To my mind, an exercise that bears the person’s weight is advantageous: if the person gains weight, the exercise burns more calories. From that perspective, a weight-bearing exercise is self-correcting against weight gain. Skipping and running share this feature, while riding the stationary bike does not. (Neither, to my mind, does swimming; I’ll say more about that in another post.)

For now, I skip two to three times per week, 15 to 20 minutes each time. I find it promotes the balance, quickness, and endurance that I need to carry me through my busy days with a nine and a twelve year old.

I’ll be talking more about exercise in future posts. For now, please enjoy this beautiful day. For those of you reading from other places: we are currently in a heat wave here. Good luck staying cool!

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

# What does a tutor do over the summer?  Tutoring continues, but at a relaxed pace.  In the breathing space, the tutor pursues various topics of interest….

Given our culture’s focus on being slender and youthful, combined with the threat of weight gain that lurks in the lifestyles of many, exercise and/or weight loss have become “everyman” topics.  This tutor is right on board:  when you deal mainly with young, fit people, you’re best off to be youthful and fit yourself.

With family, work, and the pressure to stay fit, many find themselves squeezed from different sides.  Inevitably, the following question begs to be answered:

• Assuming I can find some time for exercise, what are the best ones to do?

I’m definitely not a workout specialist; I can only contribute observations I’ve made from my own experience.  Generally, I’ve trended away from muscle building exercises, towards aerobic ones.  The year before this, I focused mainly on outdoor running, running up and down stairs, and riding the stationary bike. This past year, I’ve changed mainly to skipping.

I’ve mainly given up outdoor running for two reasons.  The first reason is injuries:  I never run on pavement, yet I still get injured running.  The second reason is crowding:  the fields I run in can be quite busy.  A serious runner needs space.

Running up and down the stairs is great.  For me, it’s indoors, so it doesn’t offer the advantage of fresh air.  Another drawback: it can’t be done when people might need to use the stairs.  Furthermore, I find it doesn’t build the calf muscles the way I like.

My stationary bike is outside, so it’s a fresh-air activity.  It truly is a great exercise; I find it to be injury-free.  From my point of view, its only drawback is that the musculature you get from it is quite disconnected from everyday life.  (I’m not a cyclist other than on the stationary bike.)

Why I like skipping, and some other observations about exercise in general, I’ll share in the  next post.  For now, let’s make the most of this perfect summer day, whatever we are doing:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

# When you tutor computer programming, you must explain the use of variables.  Such is the next step of our PERL summer project.

To a computer, a value needs a name.  Computers (at this level) aren’t capable of changing context the way humans can; they need to be told what to do, and what to do it to, at every stage.

Here’s an example of the difference between humans and computers.  Suppose, for instance, you tell a grade 6 student the numbers 11 and 29, then ask them for the average.  The student will add the numbers, divide the sum by 2, then spontaneously say “The average is 20.”  If you ask the student to tell the original two numbers, they can; however, they realize that what you really want is the answer.

On the other hand, a computer needs to “identify” a value before it can do an operation to it.  Therefore, a computer program to find the average of 11 and 29 might proceed like this:

get the value of the first number:  call it number1

get the value of the second number:  call it number2

add number1 and number2; call the sum number3

divide number3 by 2; call the result theaverage

print out “The average is ” theaverage

In traditional programming, you name a variable first, then give it a value.  When you want the computer to manipulate that value, you refer to it by its variable name.  Planning a program, you don’t wonder what the answer will be; rather, you wonder how to explain to the computer what to do in order to find the answer.  Specifically, you need to tell it what steps to perform to which variables.  Actually working with the numbers is easy for a computer, once it has clear instructions.

Commonly, variable names are written as one word, even if they indeed contain more than one.  Therefore, thirdnumber might be a likely name for the third number referenced in a program; on the other hand, you might call it number3.  Digits can be used in variable names, but usually aren’t allowed as the first character.

In PERL, variable names are commonly given a dollar sign prefix; therefore, if you wanted to call a variable number3, you’d call it \$number3.  The dollar sign prefix increases program readability for humans; it’s easy to track what’s happening with the variables, since they all start with \$.  There are other reasons, as well, for the \$ prefix on PERL variable names.

Next post, we’ll see some variables in action.  Enjoy your day:)

Source: Robert’s Perl Tutorial, by Robert Pepper.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

# Tutoring PERL beginnings, the details can be so important.  While the tutor now focuses to the Linux/Mac side, Windows users might do well to tune in.

Over my last few posts I’ve been discussing how to get started with PERL programming.  Of course, I’ve run parallel posts:  some have focused on Windows, others on Linux/Mac.  I hope you’ve all been successful in following the procedures I’ve offered.

Whichever world you reside in – assuming it is just one – knowing what’s going on in the other world often seems beneficial.  Therefore, I recommend the users of one operating system read the posts for the other, if only to realize how similar the procedures are.

Today’s emphasis is on the line

#!/usr/bin/perl

which is part of the script for Linux/Mac, but is conspicuously absent at the head of the script for Windows.

According to Robert Pepper’s Perl Tutorial, #!/usr/bin/perl is called the “shebang” line. (By the way: almost everything I know about PERL I learned from Robert Pepper.) He goes on to explain that under Unix systems (Linux is a derivative), the shebang line tells the file type so the computer knows how to execute it.

Windows, he continues, does not need a shebang line. However, a shebang line for the Windows script might look similar to this:

#!c:/strawberry/perl/bin/perl.exe

(The above shebang reveals the use of Strawberry Perl).

The line tells the location of the perl interpreter, which will execute the script. Once again, the line is not needed in Windows.

For Linux/Mac, however, you will see something like

#!/usr/bin/perl

at the head of a PERL script, and it is needed – on mine, anyway. Now you know why, whichever operating system you might use:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

# In the context of tutoring, a lazy summer day might mean academic pursuits at a relaxed pace.  The tutor acknowledges the need to bring Linux and Mac users equal with Windows users:  in this installment, he offers instructions for Linux and Mac users to execute their first PERL script.

In my previous post I instructed Windows users through the execution of their first PERL script. Now, Linux and Mac users, it’s your turn.

Open your text editor and type in the following:

#!/usr/bin/perl

print “Hello, how are you?–from PERL!\n\n”;

Let’s imagine you call your file july101 and save it in your “My_perl_programs” folder. In my experience, you can save it as type “all files” or type “text files” – just as long as it’s actually plain text.

Now, open your terminal and go into your “My_perl_programs” directory. Enter the command ls to make sure your file july101 is listed. Assuming you see it, enter the following command:

perl july101

If the process works, the terminal should reply with

Hello, how are you?–from PERL!

If you receive that greeting, congratulations! You, Linux or Mac user, have successfully executed your first PERL script.

The next few posts, we’ll review what we did during this one and last one. To quote Phil Collins in his hit song Against All Odds:

“There’s so much I have to say to you/So many reasons why….”

We’ll get to it all, in the coming days:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.