Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Named Arguments [8/9]

This program contains multiple errors. Correct all of them.

Programming languages have a very strict syntax. No mistakes are allowed, because computers can't just figure out what you had in mind. All the errors in the source code have to be corrected before a program can be executed.

When reporting an error, the automatic verifier cannot always guess the exact nature of the error. It is not possible to make a perfect automatic verifier, which would be able to correct all errors. Therefore, you cannot assume that an error message can always tell the true nature of an error.

If you can't solve an exercise, take a peek at the solution. You don't need to solve every exercise by yourself. A lot can be learned by simply reading the solution and applying it.

Hints

  • when a named argument is used, all arguments must be put inside square brackets [].
  • The strings to be printed out must be placed after named arguments.

Solution for the first statement

Change the first println statement into:

	println [x:370, y:300, height:100, "ZedLX"];

Solution for the second statement

Change the second println statement into:

	println[x:i, y:i, height:50, "ZedLX"];

Solution for the third statement

Change the third println statement into:

	println[fg:/yellow, "ZedLX"];

Solution for the fourth statement

Change the fourth println statement into:

	println[x:900-i, y:i, 
            height:50, fg:/cyan, "Zed", "LX"];

If you couldn't solve this by yourself, you should reload the page and try again, until you can do it without solutions.

Loading...