Complete the code to connect to a Wi-Fi network by specifying the network name.
connect_to_wifi(network_name=[1])The network_name parameter should be the Wi-Fi network's name (SSID), such as "HomeNetwork".
Complete the code to check if the device is connected to Wi-Fi.
if connection_status == [1]: print("Connected to Wi-Fi")
The connection_status should be compared to the string "connected" to check if the device is connected to Wi-Fi.
Fix the error in the code to get the IP address assigned by the Wi-Fi router.
ip_address = get_ip_address([1])The interface name should be a string, so it must be in quotes like "wifi".
Fill both blanks to create a dictionary of Wi-Fi networks with their signal strengths greater than 50.
strong_networks = {network: [1] for network, strength in networks.items() if strength [2] 50}The dictionary should map each network to its strength if the strength is greater than 50.
Fill all three blanks to create a dictionary of Wi-Fi networks with names in uppercase and signal strength above 70.
filtered_networks = [1]: [2] for [3], strength in networks.items() if strength > 70}
The keys are the network names in uppercase (network.upper()), the values are the signal strengths, and the loop variable is network.