Learn to Program with ZedLX

Free Online Programming Course for Beginners

Named Arguments [2/9]

Named arguments x and y of println statement change the position of text on the screen.
[Run the program]

Named arguments must be specified before other arguments in a println statement.

Exercises:

  1. Un-comment the last line of the program. To un-comment it, remove the two initial symbols << .
    [Run the program]

  2. Add a statement such that the program also displays the result of expression 7*8 at position (100, 400).

  3. Add a statement such that the program also displays the result of expression 22/3 at position (200, 400) in the orange color. The foreground color can be set by the named argument fg.

  • Track your progress by clicking the “Overview” button at the top left menu.
  • Take regular breaks to stay focused and refreshed.

Loading...