1:
An IP address is divided into 4 sections where each section contains 1-3
digits. An examp...
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β]
}
Answers: 3
Engineering, 04.07.2019 18:10
During a steady flow process, the change of energy with respect to time is zero. a)- true b)- false
Answers: 2
Engineering, 04.07.2019 18:10
Manometers are good examples of measuring instruments, nowadays they are not as common as before. a)-capacitive probe gauges b)-gravitational gauges deformation ) gauges d)-digital gauges
Answers: 1
Engineering, 04.07.2019 18:10
Calculate the bore of a cylinder that has a stroke of 18 inches and an extension time of 6 seconds at a flow rate of 4 gal/min.
Answers: 3
Engineering, 04.07.2019 18:20
Vibration monitoring this technique uses the noise or vibration created by mechanical equipment and in seme cases by plant systems to detemine their actual condtion. a)- true b)- false
Answers: 2
Mathematics, 26.03.2021 17:50
Mathematics, 26.03.2021 17:50
English, 26.03.2021 17:50
Social Studies, 26.03.2021 17:50
Computers and Technology, 26.03.2021 17:50
History, 26.03.2021 17:50
Mathematics, 26.03.2021 17:50
Medicine, 26.03.2021 17:50
Mathematics, 26.03.2021 17:50