Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Introduction [8/10]

This program outputs the expressions together with the results.
[Run the program]

At first glance, it might seem that the strings contain expressions, but that is just an illusion. Strings cannot contain expressions, they only contain text.

Strings are printed out as they are written. Expressions are evaluated, and then their results are printed.

Exercise:

Add the statement: println "3m × 4m = ", 3*4, "m²";

Loading...