Complete the code to apply a coincident constraint between two points.
ApplyConstraint('coincident', [1])
The ApplyConstraint function requires the constraint type and the two points separated by a comma.
Complete the code to apply a parallel constraint between two lines.
ApplyConstraint('parallel', [1])
The ApplyConstraint function expects the constraint type and the two lines separated by a comma.
Fix the error in the code to apply a perpendicular constraint between two lines.
ApplyConstraint('perpendicular', [1])
The correct syntax uses a comma to separate the two line arguments in the function call.
Fill both blanks to create a dictionary mapping constraint types to their function calls.
constraints = {'coincident': ApplyConstraint([1]), 'parallel': ApplyConstraint([2])}The 'coincident' constraint applies to points, so use 'point1, point2'. The 'parallel' constraint applies to lines, so use 'line1, line2'.
Fill all three blanks to define a function that applies a given constraint type to two elements.
def apply_constraint([1], [2], [3]): return ApplyConstraint([1], [2], [3])
The function takes three parameters: the constraint type and two elements. These are passed to the ApplyConstraint function in the same order.
