Bird
0
0
PCB Designbi_tool~10 mins

Bill of Materials (BOM) export 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 export the BOM as a CSV file.

PCB Design
export_bom(filename=[1])
Drag options to blanks, or click blank then click option'
Abom
B"bom.csv"
C'bom.csv'
Dbom.csv
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around the filename
Using a variable name instead of a string
2fill in blank
medium

Complete the code to include the quantity column in the BOM export.

PCB Design
export_bom(columns=["Part", [1], "Value"])
Drag options to blanks, or click blank then click option'
A"Quantity"
B"Reference"
C"Footprint"
D"Manufacturer"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong column name like "Reference" instead of "Quantity"
Forgetting to put the column name in quotes
3fill in blank
hard

Fix the error in the code to filter BOM items with quantity greater than 1.

PCB Design
filtered_bom = [item for item in bom if item["Quantity"] [1] 1]
Drag options to blanks, or click blank then click option'
A>
B<=
C==
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<=' or '<' which select wrong items
Using '==' which selects only quantity exactly 1
4fill in blank
hard

Fill both blanks to create a dictionary of part counts from the BOM list.

PCB Design
part_counts = {item[[1]]: item[[2]] for item in bom}
Drag options to blanks, or click blank then click option'
A"Part"
B"Quantity"
C"Value"
D"Reference"
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping keys and values
Using wrong column names like "Reference" or "Value"
5fill in blank
hard

Fill all three blanks to generate a filtered BOM with parts having quantity greater than 2 and export it.

PCB Design
filtered = [item for item in bom if item[[1]] [2] [3]]
export_bom(data=filtered)
Drag options to blanks, or click blank then click option'
A"Quantity"
B>
C2
D"Part"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong column name in first blank
Using wrong operator or number in second and third blanks