Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

List: Create a list named device _ ip containing IP addresses as strings. Your network consists of one router and at least one of each

List: Create a list named device_ip containing IP addresses as strings. Your network consists of one router and at least one of each of the following devices: switch, server, workstation, printer, and mobile device. Each device should have a unique IP address. The router's IP address should be '192.168.1.1'.
Print each IP address on a new line.
Tuple: Since the MAC addresses of devices are unique and not changing, you decide to store them in a tuple named device_mac. Create this tuple with MAC addresses corresponding to each IP address. A MAC address looks like '00:14:22:01:23:45'.
Print each MAC address on a new line.
Set: You also want to keep track of the different types of devices in your network. As the device types are distinct and do not have duplicates, create a set named device_type that contains the types of devices you have in your network. These include 'router', 'switch', 'server', 'workstation', 'printer', and 'mobile device'. Print each device type on a new line.
Print each device type on a new line.
List and Dictionary: Create a list named device_types. This list should contain the device type for each device corresponding to the IP address in your device_ip list and the MAC address in your device_mac tuple. Ensure that 'router' is the first device type in this list, and that the list contains at least one of each other device type.
Note: We are creating an additional list named device_types to manage the mapping of device types to their corresponding IP and MAC addresses. This ensures that there's only one router and at least one of each other device type in the network.
Now, create a dictionary named network_inventory. The dictionarys keys should be the IP addresses from your device_ip list. Each value in the dictionary will itself be a dictionary with two keys: 'MAC' and 'Type'. The 'MAC' key corresponds to the MAC address from device_mac, and 'Type' corresponds to a device type from your device_types list. Ensure that the device with the IP '192.168.1.1' is assigned the 'router' type.
Print each key-value pair on a new line.
When your program runs, it should match the expected output below.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

Has the priority order been provided by someone else?

Answered: 1 week ago

Question

Compare the current team to the ideal team.

Answered: 1 week ago