subject
Engineering, 06.08.2021 14:40 tyler8670

1: An IP address is divided into 4 sections where each section contains 1-3
digits. An example of an IP address would be 192.168.10.3 . Now IP
addresses have 2 parts; One is the network part while the other one is the
host part. If the network part is 1, we get a special address from the
given IP address where the 1st section will remain as it is and the rest of
the 3 sections will become 0. If the network part is 2, we get a special
address from the given IP address where the first 2 sections will remain as
it is and the rest of the 2 sections will become 0. Same goes for other
values of the network part. For simplicity we will consider the network
part can be 1 or 2 or 3.
Lets see an example:

IP address: 192.168.10.30
If network part = 1 , then special address = 192.0.0.0
If network part = 2 , then special address = 192.168.0.0
If network bits = 3 , then special address = 192.168.10.0

All IP addresses starting like the special address will fall under the same
special network. You will be given the value of the network part and a list
of IP addresses as input. Your task will be to create a dictionary where
the keys will be the unique special addresses and the corresponding values
will be the list of IP addresses that fall under the same special network.

Input format: Value of network part List of IP addresses separated by
β€œ,”

Sample Input 1:
1
192.168.30.10,168.192.100.30,192.15 2.55.10,240.169.10.10,168.200.43.90 ,192.169.100.45

Sample Output 1:
{
β€œ192.0.0.0”: [β€œ192.168.30.10”, β€œ192.152.55.10”, β€œ192.169.100.45”],
β€œ168.0.0.0”: [β€œ168.192.100.30”, β€œ168.200.43.90”],
β€œ240.0.0.0”: [β€œ240.169.10.10”]
}

Sample Input 2:
2
192.168.30.10,168.192.100.30,192.16 8.55.10,240.169.10.10,168.192.43.90 ,192.169.100.45

Sample Output 2:
{
β€œ192.168.0.0”: [β€œ192.168.30.10”, β€œ192.168.55.10”],
β€œ168.192.0.0”: [β€œ168.192.100.30”, β€œ168.192.43.90”],
β€œ240.169.0.0”: [β€œ240.169.10.10”]
β€œ192.169.0.0”: [β€œ192.169.100.45”]
}

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 15:10
If you were designing a bumper for a car, would you prefer it to exhibit elastic or plastic deformation? why? consider the functions of a bumper in both a minor "fender-bender" and a major collision.
Answers: 1
question
Engineering, 04.07.2019 08:10
Which of the following is an easy way to remember the modified β€œx” tire rotation? a. nondrive wheels straight, cross the drive wheels b. drive wheels straight, cross the nondrive wheels c. drive wheels crossed, nondrive wheels straight d. drive wheels crossed, nondrive wheels crossed
Answers: 1
question
Engineering, 04.07.2019 18:10
Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26Β°c with a volumetric flow rate of 0.18 m3/s. refrigerant exits at 9 bar, 70Β°c. changes in kinetic and potential energy from inlet to exit can be ignored. determine the volumetric flow rate at the exit, in m3/s, and the compressor power, in kw.
Answers: 1
question
Engineering, 04.07.2019 18:10
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
You know the right answer?
1: An IP address is divided into 4 sections where each section contains 1-3
digits. An examp...
Questions
question
Computers and Technology, 18.11.2019 19:31