Bird
0
0
PCB Designbi_tool~10 mins

Mounting hole placement in PCB Design - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the mounting hole diameter.

PCB Design
mounting_hole_diameter = [1]  # in millimeters
Drag options to blanks, or click blank then click option'
A5.0
B3.2
C10
D0.5
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a hole diameter too small for screws.
Using a diameter that is not standard for mounting holes.
2fill in blank
medium

Complete the code to place a mounting hole at the top-left corner coordinates.

PCB Design
mounting_hole_position = ([1], 0)  # x, y in mm
Drag options to blanks, or click blank then click option'
A50
B10
C0
D-5
Attempts:
3 left
💡 Hint
Common Mistakes
Using a negative coordinate for the hole position.
Placing the hole too far from the edge.
3fill in blank
hard

Fix the error in the code to correctly calculate the center position of the mounting hole.

PCB Design
center_x = board_width [1] 2
Drag options to blanks, or click blank then click option'
A*
B/
C+
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using addition or multiplication instead of division.
Subtracting 2 instead of dividing by 2.
4fill in blank
hard

Fill both blanks to create a dictionary of mounting hole positions with their labels.

PCB Design
mounting_holes = {"[1]": (0, 0), "[2]": (board_width, 0)}
Drag options to blanks, or click blank then click option'
Atop_left
Bbottom_right
Ctop_right
Dbottom_left
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up corner labels.
Using bottom corners instead of top corners.
5fill in blank
hard

Fill all three blanks to calculate the distance between two mounting holes.

PCB Design
distance = ((x2 - [1])[2]2 + (y2 - [3])[2]2) ** 0.5
Drag options to blanks, or click blank then click option'
Ax1
B**
Cy1
D+
Attempts:
3 left
💡 Hint
Common Mistakes
Using addition instead of exponentiation for squaring.
Mixing up x and y coordinates.