EZ Programing Demos

Slow motion, step by step, animated demonstrations of basic computer programing techniques

Links to topics:

Current topic:

Combining printing methods

You can use both the print and printLine commands to create your output.

 Slow  Medium  Fast 
Click 'Run' to go.

Using both of the commands print and printLine allows you to create expressive output. For example, suppose the depth of a swimming pool was 12 feet, and suppose that this depth was kept in a variable named d. You might want to output a sentence like:

    The depth of the swimming pool is 12 feet.

First, you could use print to output the start of the sentence, like this:

    print "The depth of the swimming pool is "

Second, you could output the numeric value for the variable d, as:

    print d

So far all of this output is on the same line. Lastly, you could output the end of the sentence and move to the next line using printLine with code like this:

    printLine "feet."


A flowchart for this demo looks like this:


The imaginary computer code for this program could look like:

    print("This is ");
    printLine("the first line.");
    print("The second line ");
    printLine("is here.");


Suggested next article:

At EZ Math Movie :

EZ Math Movie is a site that can help you experiment with and understand many topics in mathematics. Its main feature is an interactive animated (x, y) graph that you control with an actual programing language. There are many examples and tutorials, and EZ Math Movie is crossed referenced with both EZ Programing Demos and Zona Land Education.


Zona Land Education is a site with explanations and interactive diagrams covering many topics in physics and mathematics. Zona Land Education is cross referenced with EZ Math Movie, and it contains several animations that use EZ Math Movie's programing language.