Skip to content
daveho edited this page Mar 2, 2013 · 16 revisions

To create an exercise, select a course and press the Problems button (in the top left of the screen.) On the problems page, click the New button to create a new exercise.

You can edit an existing exercise by going to the problems page, selecting an exercise in the list, and clicking the Edit button.

Problem Type - this selects the programming langauge and how the test cases will be judged:

  • JAVA_METHOD - Write or complete a Java method. Test cases are judged by passing values to the method and comparing the method's return value against an expected value using the equals method.
  • PYTHON_FUNCTION - Write or complete a Python function. Test cases are judged by passing values to the function and comparing the function's return value against an expected value.
  • C_FUNCTION - Write or complete a C/C++ function. Test cases are judged by passing values to the function and comparing the method's return value against an expected value using the == operator.
  • C_PROGRAM - Write or complete a program (which must include a main function.) Test cases are judged by sending input text to the program as its standard input, and matching each line of program output against a regular expression. If the regular expression matches any of the lines, the test passes.
  • JAVA_PROGRAM - Write or complete Java program, meaning a top-level class with a main method. Test cases are judged by by sending input text to the program as its standard input, and matching each line of program output against a regular expression. If the regular expression matches any of the lines, the test passes.
  • RUBY_METHOD - Write or complete a Ruby method. Test cases are judged by passing values to the function and comparing the function's return value against an expected value using the == operator.

Problem name - the (brief) name of the exercise. Important: for the problem types in which the student writes a method or function (JAVA_METHOD, PYTHON_FUNCTION, C_FUNCTION, and RUBY_FUNCTION) the problem name must be the name of the method/function. For the other problem types, it is free form.

Full description - HTML describing the problem.

Skeleton code - The code that is provided to the student as a starting point. For example, in a JAVA_METHOD exercise you could define the method with an empty body for the student to complete.

Install

Downloads

Screenshots

For more info (demo server, exercise repository, contributing to cloudcoder, etc): cloudcoder.org

Clone this wiki locally