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; you are not allowed to make any mistakes because computers can't just figure out what you had in mind. All the errors in the source code have to be corrected before you are allowed to execute the program.

When reporting an error, the computer cannot always guess what exactly the error is. Therefore, you cannot assume that the error message can always tell what is the true nature of the error.

It is OK to look at the solutions after you have tried but couldn't correct the errors.

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...