APS - How Tall Tutorial Option

Boolean Logic in Code

Yes, no solutions or any binary choices are boolean.  A choice of if red is boolean as the answer is either a yes or no.  Remember from earlier that computers deal with 0 and 1, on and off, so this is the quickest way to create choices for decisions.  Each of the following code samples, 

if x > 2                 if (x <= 2 or x > 4)          if (grassIsGreen)

has a boolean yes or no answer. 

 if x > 2 answer is not that I have a 3 or 4 or 2.2, but Yes the answer is greater than 2.  

 if (x <= 2 or x > 4)   is not about the value of the number, but that the value lies either less than or equal to 2 or greater than 4.  Another way of stating this is that the value is not between 2 inclusive and 4 exclusive.

if (grassIsGreen) is a yes or no answer as grassIsGreen is defined as a boolean which means the variable can only be true or false.

In the last module you got to experiment a little making a scene, dragging in code and using it without any set plan for what you are building.  You had to have a small story to create with the code, but there was not purpose. From now on, there is a purpose to your code. The purpose "To learn more about coding" or "To learn about code decision statements" will not be accepted.  Think deeply considering the tutorial, and you extension.  What would the overall purpose of the program be used: education, entertainment, game, issue awareness, etc.?  Add to one of these or another of you choosing to understand why or how, or what a user would get from the code.  

The Decisions Assignment is the first of several Assignments that will give you a tutorial document of directions. These directions will provide you with details to create a specific type of program. In doing so, you will be learning more ideas and concepts that could eventually make your work more interesting. 

Assignment Requirement Directions:

A.  Create the program as detailed in the tutorial provided below in the PowerPoint. This format will allow you to work in portions.  Don't forget to comment at the beginning where this code came from (document has a first page providing University providing the work).  Citation example:

//  All code in this program is created from XYZ Tutorial from  _________

// as provided by GaVS except as  noted .

// Notations of code I created will be commented prior to the code starting

// and after at each instance. Code noted as such will have been created solely by

// me without assistance from others.

Click here for a powerpoint version: APS_DukeHowTallAreYouFunctionsTutorial.pptx Links to an external site. 

B.  Test as you go along to make sure small parts of the code is working.  If you wait until the end, there may be issues causing other issues, making debugging a long process. 

Testing as you go is part of the development process for creating code.  As you test a future section of code you must go back and continue to test existing sections as you may have added code causing unintended consequences to prior working code.  This is the point that you debug, not just for the new code, but to also fix anything that was not anticipated with the new section of code.  

C  Add an extension or modification to the code that is created by you, documenting that this is code created by you.  A short note here (very) for the purpose of the code is required.  Citation example:

//  Code below is created by me without assistance to make dog's jump.

     At the end of the code that you added you will place this comment or similar.

// End of code dog's jump created by me.

D.  The extension / modification must have an intended purpose that will extend your learning past that of this tutorial or use information that you learned in a new and unique way.  Yes, you may add to the scene other characters, objects, etc.   

Examples of unacceptable addition to a program: 

Suppose in the program students are counting to 5 and you change the students to count to 10.  This does not constitute additional learning.

Adding characters to "say" more words is also not considered additional learning.

E.  Follow the directions in the APS - Resources rubric (How Tall rubric) for your work.  The number of the question should always be used, followed by the answer to the question using the stem words in the question.