Skip to content

Coding Question Assessment Standards

Description and Purpose

A Coding Question Assessment contains a prompt and a workspace layout. It optionally may also include an image or a code block to accompany the prompt. coding questions enable learners to do the following inside of interactive articles and practice packs:

  • Practice writing code
  • Receive immediate feedback

Content Location

Coding questions can appear inside interactive articles, practice packs, and quizzes. Using coding questions in interactive articles can be a great way to include some of the functionality of lesson exercises without the requirement of a full LE setup. Coding Questions can be linked to in interactive articles, and will appear in practice packs if associated with a learning standard.

An image showing a coding question that has code on one side an a webapge with an image on the other. Visible are also "Run" and "Check Answer" buttons.

Overarching Standards

Fields in Author

Content

Prompt

A prompt is the question or instruction to which learners will respond.

  • Prompts should be as short as possible while making the instructions clear.
  • The prompt's language should be technically precise and unambiguous.

Test

A test is the code used to determine if a learner correctly completed the assessment. Tests can be regular expression tests or unit tests.

Writing tests for assessments is identical to writing tests for an exercise. Best practices for writing tests for exercises can be found in our documentation for test standards.

Attributes

Layout Components

This determines the components a learner will have access to. There are four options for your layout:

  • Code Editor: This layout is useful for exercises that require users to code without expecting them to see any output when running the code.
  • Code Editor, Output Terminal: This layout is useful for exercises that expect output to a console when code is run.
  • Code Editor, SQL Preview: This layout is useful for exercises that require the user to see the results of a SQL query. The SQL Preview component displays both the output of a SQL query, as well as the schema of the tables queried. This will use a SQLite database and sqlite files.
  • Code Editor, Web Browser: This layout is useful for exercises that teach web development as well as exercises where an image is the expected output of running code (e.g. Numpy, Pandas, Matplotlib).

You can learn more about Code Editors in our documentation for the code editor layour component.

Workspace

The workspace defines the starting code and solution code a learner has access to.

Best practices for creating workspaces can be found in our documentation for exercise workspace standards.

Linked Content

Learning Standard List

This field lists the learning standards associated with a given content item. If an assessment is linked to a learning standard, it can appear in practice packs generated for that specific standard.

  • Each assessment should be aligned with at least one learning standard. Note that the learning standards are not visible to the learner.
  • Some assessments in articles might not have a linked Learning Standard if they only make sense within the context of that article.

Interactive Articles Section

This field is automatically generated. Its contents are generated from the list of articles that contain this assessment. This association is edited from within articles, not the assessments.

Examples