Challenge - 5 Problems
Flip Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Output of flipping coordinates in CNC setup
Given a CNC program snippet that flips the X coordinate around a center line at X=100, what is the output coordinate after flipping point X=30?
CNC Programming
def flip_x(x, center=100): return 2*center - x flipped = flip_x(30) print(flipped)
Attempts:
2 left
💡 Hint
Think about how flipping works around a center line: the distance from the point to the center is mirrored.
✗ Incorrect
Flipping X=30 around center 100 means the distance 70 (100-30) is mirrored to the other side: 100 + 70 = 170.
🧠 Conceptual
intermediate1:30remaining
Understanding flip operations in multiple CNC setups
In a two-sided CNC machining process, why is it important to apply a flip operation when switching from the front side to the back side?
Attempts:
2 left
💡 Hint
Think about how the part orientation changes physically when flipped.
✗ Incorrect
Flipping the part changes the coordinate orientation. Applying a flip operation keeps tool paths consistent relative to the part.
🔧 Debug
advanced2:00remaining
Identify the error in flip operation code
This CNC script attempts to flip Y coordinates around Y=50 but produces incorrect output. What is the error?
CNC Programming
def flip_y(y, center=50): return center - y print(flip_y(20))
Attempts:
2 left
💡 Hint
Check how flipping around a center line works mathematically.
✗ Incorrect
Flipping requires mirroring the distance from the center, so the formula is 2*center - y, not center - y.
🚀 Application
advanced2:30remaining
Calculate final coordinates after two flips
A point at (X=40, Y=60) is flipped first around X=50, then around Y=70. What are the final coordinates?
Attempts:
2 left
💡 Hint
Flip X first: new X = 2*50 - 40. Then flip Y: new Y = 2*70 - 60.
✗ Incorrect
Flip X: 2*50 - 40 = 60. Flip Y: 2*70 - 60 = 80. Final point is (60, 80).
📝 Syntax
expert2:00remaining
Identify syntax error in CNC flip operation script
Which option contains a syntax error in the Python code for flipping coordinates?
CNC Programming
def flip_point(x, y, center_x=100, center_y=50): flipped_x = 2*center_x - x flipped_y = 2*center_y - y return (flipped_x, flipped_y) print(flip_point(30, 20))
Attempts:
2 left
💡 Hint
Check function definition syntax carefully.
✗ Incorrect
Option A is missing the colon ':' after the function definition line, causing a SyntaxError.