Bird
0
0
PCB Designbi_tool~10 mins

Schematic editor interface 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 add a new component to the schematic.

PCB Design
schematic.add_component([1])
Drag options to blanks, or click blank then click option'
Arotate
Bdelete
Czoom_in
Dresistor
Attempts:
3 left
💡 Hint
Common Mistakes
Using actions like delete or zoom instead of a component type.
Passing a command instead of a component name.
2fill in blank
medium

Complete the code to connect two components with a wire.

PCB Design
schematic.connect([1], component_b)
Drag options to blanks, or click blank then click option'
Acomponent_a
Bdelete_wire
Czoom_out
Drotate_component
Attempts:
3 left
💡 Hint
Common Mistakes
Using commands instead of component names.
Confusing the order of arguments.
3fill in blank
hard

Fix the error in the code to select a component by its ID.

PCB Design
selected = schematic.select_component([1])
Drag options to blanks, or click blank then click option'
Acomponent_id
B'1234'
C1234
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the ID as a number without quotes.
Using undefined variables.
4fill in blank
hard

Fill both blanks to create a dictionary of component names and their positions.

PCB Design
positions = { [1]: schematic.get_position([2]) for [1] in components }
Drag options to blanks, or click blank then click option'
Aname
Bcomponent
Ccomp
Dpos
Attempts:
3 left
💡 Hint
Common Mistakes
Using different variable names for key and argument.
Using variable names that don't match the iteration.
5fill in blank
hard

Fill all three blanks to filter components by type and create a list of their IDs.

PCB Design
filtered_ids = [[1].id for [2] in schematic.components if [3] == 'resistor']
Drag options to blanks, or click blank then click option'
Acomp
Bcomponent
Ccomponent.type
Dcomp.type
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing variable names in the loop and condition.
Checking the wrong attribute for type.