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 23:20
Two technicians are discussing the intake air temperature (iat) sensor. technician a says that the computer uses the iat sensor as a backup to the engine coolant temperature (ect) sensor. technician b says that the powertrain control module (pcm) will subtract the calculated amount of fuel if the air measures hot. who is correct
Answers: 3
question
Engineering, 04.07.2019 18:10
Water at 70°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
question
Engineering, 04.07.2019 18:10
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
The higher the astm grain size number, the finer the gran is. a)-true b)-false
Answers: 2
You know the right answer?
1: An IP address is divided into 4 sections where each section contains 1-3
digits. An examp...
Questions
Questions on the website: 13722367