CSC 486: CodeWorkout Exercise Documentation – YAML Files


This is how the documentations works out of YAML files for CodeWorkout. Before I start explaining, if you do not know what YAML is pleased the link below and if you do not know what CodeWorkout is please follow this link: What is CodeWorkout?

What is YAML?

Getting started:

Any way to first thing off with a bang let’s look at a YAML file:

An Example of a Multiple Choice Question

– external_id: cs1114-sp2016-hw02-q07
is_public: false
experience: 50
language_list: Java
style_list: multiple choice, single answer
tag_list: initialization, objects
version: 1
– multiple_choice_prompt:
position: 1
question: |
A special kind of method that is used to initialize a brand new
The object, when it is created, is called a:
allow_multiple: false
– answer: constructor
position: 1
value: 1
– answer: initializer
position: 2
value: 0
– answer: creator
position: 3
value: 0
– answer: builder
position: 4
value: 0

An Example of a Coding Question

– name: powLoop
external_id: powLoop
is_public: false
experience: 50
language_list: Java
style_list: code writing
tag_list: loops, logic, arithmetic
version: 1
– coding_prompt:
position: 1
question: |
Given two numbers, `n` and `x`, use a loop to compute the value
of `n` raised to the `x` power–that is, `n` multiplied by itself
`x` times. You may not use standard library functions from the
`Math` class in your answer.
class_name: Answer
method_name: powLoop
starter_code: |
public int powLoop(int n, int x)
wrapper_code: |
public class Answer

public static class Math {}
public static class java
public static class lang
public static class Math {}
tests: |
“1, 0”,1,example
“2, 4”,16,example
“3, 2”,9,example
“3, 0”,1
“0, 3”,0
“-2, 2”,4
“2, 7”,128
“10, 3”,1000
“5, 3”,125
“3, 4”,81,hidden

Starting from the top:


A string use for the sole purpose of identifying a question this is the application.


A string that defines if the user can see the excise in the gym.


An integer that is usually out of 100 pts based on difficulty level of the question. Only used in the gym.


String(s) that represent tags of coding languages. For example: language_list: C++


String(s) that that represent tags of a type of questions. For example language_list: multiple choice


String(s) that that represent tags of a type of question content. For example language_list: logic


This is used to setlist version control that way we know what the current version of this assignment is.


This tells what version number is this assignment.


This tells who the creator of the assignment is


Tells the application, what to prompts that user. Example: multiple_choice_prompt


Tells the location of this question for the use of multiple part questions.


This is the question you have asked the user.

Multiple Choice Questions:


The field for setting up multiple choice questions. There two parts to choices, one being position and the other being a value.


This is an integer for the location of the multiple choice answer. Integer counter starts at 1 and go from there.


This is an integer from 0 to 1. 1 being correct and 0 being wrong.

Coding Questions:


Answer is the only tag know


The name of the method used by the user for the answer.


The starting code for the user that will be displayed in the code environment.


Code that needs to complete testing.


Tests results for the pursuit of check the answer.



One Reply to “CSC 486: CodeWorkout Exercise Documentation – YAML Files”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s