Complete the code to calculate the total number of layers in a PCB design.
total_layers = base_layers [1] additional_layersAdding base layers and additional layers gives the total number of layers in the PCB.
Complete the code to filter PCB components with resistance greater than 100 ohms.
filtered_components = [comp for comp in components if comp.resistance [1] 100]
The '>' operator filters components with resistance greater than 100 ohms.
Fix the error in the code to calculate the total cost of PCB components.
total_cost = sum(comp.price [1] comp.quantity for comp in components)
Multiply price by quantity for each component before summing to get total cost.
Fill both blanks to create a dictionary of component names and their quantities for components with quantity greater than 5.
component_dict = {comp.[1]: comp.[2] for comp in components if comp.quantity > 5}The dictionary keys are component names and values are their quantities.
Fill all three blanks to create a list of component names with resistance less than 50 ohms and price below 10.
selected_components = [comp.[1] for comp in components if comp.[2] [3] 50 and comp.price < 10]
The list comprehension selects component names where resistance is less than 50 ohms and price is below 10.
