Bird
0
0
PCB Designbi_tool~10 mins

Electrical Rules Check (ERC) 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 run an Electrical Rules Check (ERC) on the PCB design.

PCB Design
erc_results = pcb_design.run_[1]()
Drag options to blanks, or click blank then click option'
AERC
BDRC
CFRC
DLRC
Attempts:
3 left
💡 Hint
Common Mistakes
Using DRC instead of ERC
Typing a non-existent method name
2fill in blank
medium

Complete the code to filter ERC errors by severity level.

PCB Design
critical_errors = [e for e in erc_results if e.[1] == 'Critical']
Drag options to blanks, or click blank then click option'
Atype
Bseverity
Ccode
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'type' instead of 'severity'
Filtering by 'status' which is unrelated
3fill in blank
hard

Fix the error in the code that summarizes ERC errors by type.

PCB Design
error_summary = [1](erc_results, key=lambda e: e.type)
Drag options to blanks, or click blank then click option'
Amap
Bfilter
Cgroupby
Dreduce
Attempts:
3 left
💡 Hint
Common Mistakes
Using filter instead of groupby
Using map which transforms but does not group
4fill in blank
hard

Fill both blanks to check if any ERC error is unresolved and critical.

PCB Design
has_critical_unresolved = any(e.[1] == 'Critical' and e.[2] == False for e in erc_results)
Drag options to blanks, or click blank then click option'
Aseverity
Bresolved
Cstatus
Dtype
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'status' instead of 'resolved'
Checking 'type' instead of 'severity'
5fill in blank
hard

Fill all three blanks to generate a report of ERC errors grouped by type and count.

PCB Design
report = [1]([2]([3], key=lambda e: e.type), key=lambda g: g[0])
error_counts = {group: len(list(items)) for group, items in report}
print(error_counts)
Drag options to blanks, or click blank then click option'
Asorted
Bgroupby
Cerc_results
Dfilter
Attempts:
3 left
💡 Hint
Common Mistakes
Sorting before grouping
Using filter instead of groupby
Passing wrong data to groupby