Complete the code to define a star topology where all nodes connect to a central hub.
topology = {'hub': ['node1', 'node2', 'node3'], 'type': '[1]'}A star topology connects all nodes to a central hub.
Complete the code to add a new node to a mesh topology.
mesh_nodes = ['node1', 'node2', 'node3'] mesh_nodes.[1]('node4')
Use append() to add a new node to the list.
Fix the error in the code to correctly check if a node is in a bus topology.
bus_nodes = ['node1', 'node2', 'node3'] if 'node4' [1] bus_nodes: print('Node found')
Use 'in' to check membership in a list.
Fill both blanks to create a dictionary comprehension mapping nodes to their connection count in a mesh.
connections = {node: len([1]) for node in [2]Each node connects to all nodes in mesh_nodes, so use mesh_nodes for both.
Fill all three blanks to filter nodes with more than 2 connections in the topology dictionary.
filtered = {node: count for node, count in topology.[1]() if count [2] [3]Use items() to get node-count pairs, then filter counts greater than 2.
