Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a programin in Python 3. 4 Steps with examples Use Python 3 to code this program IP Address Descriptor (IPv4) Name the program ip_descriptor.py
Write a programin in Python 3. 4 Steps with examples
Use Python 3 to code this program IP Address Descriptor (IPv4) Name the program ip_descriptor.py Write a program that reads four integer values corresponding to an IP address "a1.a2.a3.a4" (IPv4) and determines whether the values form a valid IP address, the class of this IP address, and whether or not the values correspond to a reserved IP address space 1. When Is An IP Address Valid? (25 points) The input IP address components a1, a2, a3 and a4 form a valid IP address if a1 is between 1 and 255, and the rest of the values are between 0 and 255, both included NOTE: Once your program determines that the input IP address is invalid, it can terminate by using the command sys.exit0. You will also need the import sys module at the beginning of your program. NOTE: use a single if/else statement with a Boolean expression 2. How To Determine The Class Of An IP Address? (25 points) The class of an IP address depends on the range a1 falls in Class Range A 1 127 B" 128-191 "C" 192-223 D" 224 239 E" 240-255 NOTE: use only a multi-way conditional statement. 3. Determine if an IP Address Is Coming From A Specific Place? (50 points) In this case, you are tasked to determine if an IP address is coming from the French Polynesia or not, whenever a1.a2.a3.a4 fall in one of the address ranges below: IP Addresses 123.50.64.0 148.66.64.0 202.3.224.0 202.90.64.0 203.185.160.0 - 123.50.127.255 148.66.127.255 202.3.255.255 202.90.95.255 203.185.175.255 NOTE: use a multi-way conditional statement with Boolean expressionsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started