Skip to content
Classroom

Question Writing Guide

Learn to create interactive, randomized questions for Varsity Learning assessments.

Getting Started

If you're new to question writing, start here:

  1. Question Parts — Understand the structure of a Varsity Learning question (setup code, question text, answer parts, hints, solutions)
  2. Basic Control Syntax — Define variables, do arithmetic, use conditionals
  3. Randomizers — Make values differ for each student

Core Concepts

Variables

All questions use variable definitions with a $ prefix:

$a = 5;                   // Number
$values = array(2,4,6);   // Array
$text = "example";        // String

Code Sections

Every question has up to three code sections:

  • Common Control — Definitions used in both display and scoring
  • Question Control — Additional definitions only for display
  • Answer — Defines the correct answer and grading rules

Math Display

Use backticks with AsciiMath notation:

The solution to `$a x = $b` is `x = $b/$a`

Features

Randomization & Variation

  • Randomizers — Create parametric questions where values change for each student

Visualizations

Mathematical Tools

  • Math Entry — Configure how students enter mathematical expressions

Answer Types

Reference

Control & Functions

Question Types

Numeric Response - Number — Integer or decimal inputs - Calculated — Mathematical expressions - Complex Numbers — Complex number answers - N-Tuple — Ordered pairs, triples, etc. - Matrices — Matrix entries

Selection - Multiple Choice - Multiple Answer - Matching

Expressions - Function — Algebraic expression / function graph - Intervals — Interval notation answers - Chemistry — Chemical formula and equation answers

Other - String — Short text responses - Essay — Free-response (manual grading) - Drawing — Student-drawn curves and constructions - File Upload — Student-submitted files - Multipart — Multiple sub-questions in one item - Conditional — Custom grading logic

Tips

Best Practices

  • Test your questions thoroughly before assigning them
  • Use meaningful variable names (e.g., $principal not $p)
  • Add hints to help students without giving away the answer
  • Use randomizers to discourage copying
  • Preview the question to see what students will see
  • Check that your question works correctly at the boundary values of your random range

Common Questions

Getting Help