#### [Simple grading example: draggables on draggables]

#### Describe carbon molecule in LCAO-MO.

correct_answer = [ { 'draggables': ['p'], 'targets': ['p_l', 'p_r'], 'rule': 'unordered_equal' }, { 'draggables': ['s'], 'targets': ['s_l', 's_r'], 'rule': 'unordered_equal' }, { 'draggables': ['up_and_down'], 'targets': [ 's_l[s][1]', 's_r[s][1]' ], 'rule': 'unordered_equal' }, { 'draggables': ['up'], 'targets': [ 'p_l[p][1]', 'p_l[p][3]', 'p_r[p][1]', 'p_r[p][3]' ], 'rule': 'unordered_equal' } ]

if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']

#### [Complex grading example: draggables on draggables]

#### Describe carbon molecule in LCAO-MO.

correct_answer = [ {'draggables': ['p'], 'targets': ['p-left-target', 'p-right-target'], 'rule': 'unordered_equal'}, {'draggables': ['s'], 'targets': ['s-left-target', 's-right-target'], 'rule': 'unordered_equal'}, {'draggables': ['s-sigma'], 'targets': ['s-sigma-target'], 'rule': 'exact'}, {'draggables': ['s-sigma*'], 'targets': ['s-sigma*-target'], 'rule': 'exact'}, {'draggables': ['p-pi'], 'targets': ['p-pi-target'], 'rule': 'exact'}, {'draggables': ['p-sigma'], 'targets': ['p-sigma-target'], 'rule': 'exact'}, {'draggables': ['p-pi*'], 'targets': ['p-pi*-target'], 'rule': 'exact'}, {'draggables': ['p-sigma*'], 'targets': ['p-sigma*-target'], 'rule': 'exact'}, { 'draggables': ['up_and_down'], 'targets': ['s-left-target[s][1]', 's-right-target[s][1]', 's-sigma-target[s-sigma][1]', 's-sigma*-target[s-sigma*][1]', 'p-pi-target[p-pi][1]', 'p-pi-target[p-pi][2]'], 'rule': 'unordered_equal' }, { 'draggables': ['up'], 'targets': ['p-left-target[p][1]', 'p-left-target[p][2]', 'p-right-target[p][2]', 'p-right-target[p][3]',], 'rule': 'unordered_equal' } ]

if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']

#### [Complex grading example: no draggables on draggables]

#### Describe carbon molecule in LCAO-MO.

correct_answer = [ { 'draggables': ['1'], 'targets': [ 's_left', 's_right', 's_sigma', 's_sigma_star', 'p_pi_1', 'p_pi_2' ], 'rule': 'exact' }, { 'draggables': ['7'], 'targets': ['p_left_1', 'p_left_2', 'p_right_2','p_right_3'], 'rule': 'exact' }, { 'draggables': ['11'], 'targets': ['s_sigma_name', 'p_sigma_name'], 'rule': 'exact' }, { 'draggables': ['13'], 'targets': ['s_sigma_star_name', 'p_sigma_star_name'], 'rule': 'exact' }, { 'draggables': ['15'], 'targets': ['p_pi_name'], 'rule': 'exact' }, { 'draggables': ['16'], 'targets': ['p_pi_star_name'], 'rule': 'exact' }]

if draganddrop.grade(submission[0], correct_answer): correct = ['correct'] else: correct = ['incorrect']