Conditional Statement Facts

The following table describes three conditional blocks available with C#.

The following table shows common data type keywords.

When the last character in a line is a backslash in a Python program, what does that mean?

Answer.  The backslash is simply used to enable a carriage return like capability when writing your code, as in the example below.

 

Expressed as a ratio from 0 to 1.00.   Observed in a distribution of scores to the maximum variation that could exist in a particular distribution.

 0.00 indicates no variation.  1.00 represents maximum variation.

 The most common usage for this is for nominal variables and it can be used with any variable when scores have been grouped into a frequency distribution.

For example, given the following tables representing a city's marital status in the hundreds, we may want to know which of the two cities is more diverse (or heterogeneous).

The following program will take the users input (in this case grades on a 1 - 100 scale) and provide the average grade noted as both a numeric value and letter grade.
 
One of the neat work-arounds shown in this example is the use of the switch statement.  Visual Basic has a similar statement to C#'s switch, however it is a little more flexible.  In each case condition in Visual Basic, you can name a range.  However, the switch statement in C# you can only test one value at a time. 
 

Often we learn a programming language to accomplish a task that was assigned to us at work or in class.   Although we find the experience gratifying, we don't have an opportunity to continue to use the new skill we learned until another occasion arises when we need to use it.  

 

Lately, within the last year, I've been hearing a lot about Python in one form or another.  The things I've heard or read are good of course.  Among the things read and heard, the top three are that it is portable, fast and flexible.

Currently I don't have too much time to spend exploring Python, however I am still naturally curious about Python as you are.   So I decided to install it and write about the ease of the installation and write a small program using Python.  

Below are the steps and some example code that will help you upload a fixed width column text file into MySQL.   

1.) Determine the width of your columns in your text file.  In this example, we are using a text file named listings.txt.  This text file is an attachment to this post.  The attached text file has teh following columns:

If you get the following error in SAS:

ERROR: Expression using greater than (>) has components that are of different data types

you may be trying to evaluate dates.  The following SAS PROC SQL code would generate those errors.