Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Named Arguments [5/9]

By default, the println statement prints text on a black background rectangle.
[Run the program]

To change the color of the background rectangle, use the named argument bg.

Keywords are words in the source code that have a special meaning in the program. They are usually displayed in dark blue color. This program uses two keywords: println and print.

print statements are almost identical to println statements. The only difference is that print statements don't advance the text output to a new line.

Exercises:

1. Change the last statement of the program so that the text is printed on a red background.
[Run the program]

2. Change the first two println keywords in this program into print keywords.
[Run the program]

Loading...