Matching
Matching Widget for Marimo
MatchingWidget
Bases: BaseWidget
A matching question widget where students pair items from two columns using drag-and-drop.
Attributes:
| Name | Type | Description |
|---|---|---|
question |
str
|
The question text to display |
left |
list
|
Items in the left column |
right |
list
|
Items in the right column |
correct_matches |
dict
|
Mapping of left column indices to right column indices |
value |
dict
|
Current state with 'matches', 'correct', and 'score' keys |
Source code in src/marimo_learn/matching.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
Example
