Help Articles

In-browser coding

In some Coursera courses, you'll be able to write and execute code on the Coursera website without having to download or switch between any extra tools.

In-browser coding may show up in readings, videos, or assignments. Make sure you understand the instructions before you start working.

To use in-browser coding:

  1. Click inside the white box with practice code in it.
  2. Type your code.
  3. Click Run.
  4. Check the message underneath the white box for details about your code.

If you see an "Submit Error" message on a red background, check your code for common errors. Once you fix them, you can try again by typing your new code in the white box and clicking Run

If you have questions or need more help with an in-browser coding prompt, try asking in the course's forums.

 

Common errors:

You might have an infinite loop in your code. An infinite loop (or endless loop) is a sequence of instructions in a computer program that loops endlessly, either due to the loop having no terminating condition, having one that can never be met, or one that causes the loop to start over. 

There may be a syntax error. A syntax error is an a character or string incorrectly placed in a command or instruction that causes a failure in execution. Syntax errors are related to unparseable code. This could happen because of a missing colon from the end of an "if" or "while" line. More examples are available here.


Powered by Zendesk