Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start the facing operation with the correct spindle speed command.
CNC Programming
M03 S[1] ; Start spindle clockwise at speedAttempts:
3 left
💡 Hint
Common Mistakes
Using a spindle speed that is too low or too high for facing.
Omitting the S command after M03.
✗ Incorrect
The spindle speed S1500 is a common speed for facing operations to ensure smooth cutting.
2fill in blank
mediumComplete the code to move the tool to the starting position for facing.
CNC Programming
G00 X[1] Z0 ; Rapid move to start facingAttempts:
3 left
💡 Hint
Common Mistakes
Starting at a position inside the workpiece instead of the outer edge.
Using G01 instead of G00 for rapid positioning.
✗ Incorrect
Starting at X0 means the tool is at the outer edge of the workpiece for facing.
3fill in blank
hardFix the error in the code to correctly perform a facing cut along the Z axis.
CNC Programming
G01 X0 Z[1] F0.2 ; Linear feed for facing
Attempts:
3 left
💡 Hint
Common Mistakes
Using a positive Z value which moves the tool away from the material.
Setting Z to zero which does not move the tool.
✗ Incorrect
Facing moves the tool from the outer edge inward along the Z axis, so Z must be negative to cut into the material.
4fill in blank
hardFill both blanks to create a loop that repeats facing passes with depth increments.
CNC Programming
for pass_num in range(1, [1] + 1): depth = pass_num * [2] print(f"Facing pass at depth: {depth} mm")
Attempts:
3 left
💡 Hint
Common Mistakes
Using too few passes or too large depth increments causing rough cuts.
Confusing the loop range or depth calculation.
✗ Incorrect
The loop runs 5 passes, each increasing depth by 2 mm for controlled facing cuts.
5fill in blank
hardFill all three blanks to define a dictionary mapping pass numbers to depths and filter passes deeper than 4 mm.
CNC Programming
depths = {pass_num: pass_num * [1] for pass_num in range(1, [2] + 1)}
filtered = {k: v for k, v in depths.items() if v [3] 4}
print(filtered)Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect operators causing wrong filtering.
Mixing up the range or depth increment values.
✗ Incorrect
Each pass depth increases by 2 mm, total 5 passes, filtering depths greater than 4 mm shows passes deeper than 4 mm.
