You are viewing this question as it will appear in the manual grading interface. Return to the normal view when you are done.

Autograder demo: Square a number

This is a simple example question that provides a variable to the student and expects one in return. A list of variables for the user is defined in the parameter names_for_user, and the student can only access these from the setup code. Similarly, a list of variables from the user can be defined in names_from_user. These two parameters control access to variables in the setup and the user code, and are also used to populate the variable tables below.

Find the square of x and save it as x_sq.

The setup code gives the following variables:

Name Type Description
x float The number that needs to be squared

Your code snippet should define the following variables:

Name Type Description
x_sq float The square of $x$
user_code.py

Correct answer

Student view placeholder

In student views this area is used for assessment and score info.
Tools

Staff information

Question

Title:
Autograder demo: Square a number

Variant

Started at:
2026-09-19 08:00:25 (CDT)
Duration:
0s
Show/Hide answer
{}
History
dec frac
rad deg