PRB - Math and Programming (Lesson)

Math and Programming 

Now let's examine programming using math variables and some basic concepts.

cost = price * nbrOfItems + 10

The variables: cost, price, nbrOfItems are all variables, just like x and y, but these word-like variables are more descriptive of what is happening. This equation is still linear, just like y = mx + b, the standard equation of a line, and should be interpreted the same. In other words, if graphed the equation cost = price*nbrOfItems would graph as a line, with better labels on the axis' representing the actual problem information (data) being worked with.

Note in the graph below, the x and y axis labels are number of items and cost of the items respectively. If this was a business buying the items, the business could quickly know that the cost for buying 10 items would be 30 dollars in a visual manner.   The visual allows the person buying to see the difference in cost for buying various numbers of items quickly all on one chart.   Visualization is many times easier with data than computing the calculation one at a time. Using the graph provides an easier analysis of cost, plus it clearly states that the initial cost for zero bought is $10. This is but one way that computer software and programming can help create visuals that provide eye catching information for others to view.

Concatenation

Using data is about creativity. How can data be represented to allow others to understand and view results easily to acquire knowledge?  

This is part of the growth of infographics, a method to create a poster-like entity using computer software and computer-aided techniques to illustrate a message or context to create understanding or relay information to others. With the software available, video links as well as sound links etc. can be embedded.  

Math construction is important in programming and we will see this as we proceed further in the use of Alice. Here we are going to begin learning how to do the basics in math.  

It is time to try some more of the various programming concepts. In this video we will examine concatenation, the process of connecting string and variable objects to create a complete thought.

Watch and use your Alice to do as the video progresses to understand the details required to create a concatenated saying.

Random Programming Tools

Now that you have worked with concatenation and some of the other math constructs, let's look at generating our own numbers for use in the problem. Use the Alice program that you have been working with to follow along with the video and learn to use the math random programming tool.  

VIDEOS CREATED BY GAVS