Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to move the tool in a straight line to X10 Y10.
CNC Programming
G01 X[1] Y10Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong coordinate value like 20 or 5.
Confusing G01 with arc commands.
✗ Incorrect
The command G01 moves the tool in a straight line to the specified coordinates. Here, X10 moves the tool to X=10.
2fill in blank
mediumComplete the code to create a clockwise arc to X20 Y20 with center offset I5 J0.
CNC Programming
G02 X20 Y20 I[1] J0Attempts:
3 left
💡 Hint
Common Mistakes
Using zero or negative values for I when positive is needed.
Mixing up I and J values.
✗ Incorrect
I5 means the arc center is offset 5 units in the X direction from the start point.
3fill in blank
hardFix the error in the code to create a counterclockwise arc to X30 Y30 with center offset I0 J10.
CNC Programming
G03 X30 Y30 I[1] J10Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-zero value for I when zero is needed.
Confusing I and J values.
✗ Incorrect
I0 means no offset in X direction, which matches the problem statement.
4fill in blank
hardFill both blanks to complete the code for a contour: a line to X40 Y40, then a clockwise arc to X50 Y50 with center offset I5 J{{BLANK_2}}.
CNC Programming
G01 X[1] Y40 G02 X50 Y50 I5 J[2]
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong X coordinate for the line move.
Using zero or negative value for J when positive is needed.
✗ Incorrect
First line moves to X40 Y40, then arc center offset J5 matches the arc center offset.
5fill in blank
hardFill all three blanks to create a contour dictionary with keys as points and values as commands, filtering only commands with radius > 5.
CNC Programming
contour = [1]: [2] for [3], cmd in commands.items() if cmd['radius'] > 5}
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong variable names for keys or values.
Confusing the iteration variables.
✗ Incorrect
The dictionary comprehension uses point as key, cmd as value, and iterates over point, cmd pairs.
