Question: Using the information from Table 1: GPA 4 Routers and Switches Download Table 1: GPA 4 Routers and Switches, create a dictionary of routers and

Using the information from Table 1: GPA 4 Routers and Switches Download Table 1: GPA 4 Routers and Switches, create a dictionary of routers and a separate dictionary of switches. You will need to create another empty dictionary that will contain all the updated devices (device name, new ip address). Create two accumulator variables to keep track of the number of valid updates and the number of invalid addresses. Create an empty list to record invalid IP addresses entered by the user, just the address, not the device. This is how your program should flow: Display the routers and switches as shown, below. Prompt the user for a device to update. Prompt the user for a new IP address. Use a while loop to validate the IP address is a valid address; all the octets are between 0 and 255. See the HINT for code examples. If it is not valid, increment the counter, keeping track of the number of invalid IP addresses entered, and append the invalid address to the invalidIPAddress list. If the IP address is valid, update the IP address for the device in the dictionary and display a message to the user that the device was updated and to what, as shown below. Add the device and new IP address to a dictionary to keep track of updates. Increment the counter, keeping track of the number of valid updates. Display the number of updates, the dictionary of updates, the number of invalid IPs, the list of invalid IP addresses, and the updated routers and switches dictionaries. Please make your output look like the expected output, no extra prompts, questions, inputs, or outputs.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!