Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start creating a new symbol in the PCB design software.
PCB Design
symbol = pcb.new_symbol([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using function names instead of a string for the symbol name.
✗ Incorrect
You need to provide the symbol_name as a string to create a new symbol.
2fill in blank
mediumComplete the code to add a pin to the custom symbol with the correct pin number.
PCB Design
symbol.add_pin(number=[1], name='Pin1')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string instead of an integer for the pin number.
✗ Incorrect
The pin number should be an integer, so use 1 without quotes.
3fill in blank
hardFix the error in the code to set the pin type correctly.
PCB Design
symbol.add_pin(number=1, name='Pin1', type=[1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using unquoted words for pin type causing syntax errors.
✗ Incorrect
The pin type should be a string like 'input' enclosed in quotes.
4fill in blank
hardFill both blanks to add a rectangle shape to the symbol with correct coordinates.
PCB Design
symbol.add_shape(type=[1], coords=[2])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong shape type or incorrect coordinate format.
✗ Incorrect
The shape type should be 'rectangle' and coordinates a list like [0, 0, 100, 50].
5fill in blank
hardFill all three blanks to finalize the symbol by setting its reference, value, and saving it.
PCB Design
symbol.set_reference([1]) symbol.set_value([2]) symbol.[3]()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using load instead of save or missing quotes around strings.
✗ Incorrect
Set reference as 'R1', value as '10k', and call save() to save the symbol.
