Question Writing Guide¶
Learn to create interactive, randomized questions for Varsity Learning assessments.
Getting Started¶
If you're new to question writing, start here:
- Question Parts — Understand the structure of a Varsity Learning question (setup code, question text, answer parts, hints, solutions)
- Basic Control Syntax — Define variables, do arithmetic, use conditionals
- 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¶
- Graph/Table Macros — Display functions, tables, plots, and labeled diagrams
Mathematical Tools¶
- Math Entry — Configure how students enter mathematical expressions
Answer Types¶
- Question Types — Choose from 17 question types
- Macros Reference — Built-in functions for formatting, math, strings, arrays
Reference¶
Control & Functions¶
- Control Syntax — Conditionals, loops, operators
- Macros Reference — Built-in functions
- Math Macros — Trigonometry, roots, GCD, random numbers
- String Macros — Text manipulation
- Array Macros — Array operations
- Format Macros — Beautify output, number formatting
- Conditional Macros — Comparisons, testing
- Feedback Macros — Dynamic feedback messages
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.,
$principalnot$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
- How do I create a question that changes for each student? Use randomizers
- How do I display a graph? Use the graph macros
- How do I grade an algebraic expression? Use the Function question type
- How do I grade a numeric answer with tolerance? Use the Number question type
Getting Help¶
- Email Support: support@varsitylearning.com