Question
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
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 and when is an IP address valid. The input IP address components a1,a2,a3,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. Once the program determines that the input IP address is invalid, it can terminate by using the command sys.exit() You will also need the import.sys module at the beginning of the program.Use a single if/else statement with a boolean expression. PYTHON
Determine the class of an IP address which depends on the range the a1 falls in: A 1-127, B 128 - 191, C 192 - 223, D 224-239 E 240 - 255 USE ONLY THE MULTI-WAY CONDITIONAL STATEMENT. Determine if an IP address is coming from a specific place Cape verde or not when a1,a2,a3,a4, falls in one of the following address ranges
41.74.128.0 - 41.74.143.255, 41.215.208.0 - 41.215.223.255, 41.221.192.0 - 41.221.207.255, 165.90.96.0 - 165.90.127.255, 197.255.128.0 - 197.255.143.255
use multi-way conditional statement with Boolean expression. sample run: IP Descriptor Program
by me
Enter the four components of an IP address, separated by commas 165,90,125,64
This is a valid IP address.
This is a class B address
This an Ip address from Cape Verde
Step 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