Write a Python code that determines if a given IPv4 address is Class A, B or C, or none of them. The code is expected to get an IPv4 address from a user using the input statement. It is expected to print a message indicating the network it belongs to or indicating that it does not belong to any of them based on findings. You are not supposed to use any built-in Python function that checks the validity of IP addresses.

Private IPv4 addresses consist of 4 integer numbers separated by dots.
They can have the following forms:
• 10.x.x.x: Class A network
• 172.y.x.x: Class B network
• 192.168.x.x: Class C network
where 0 £ x £ 255 and 16 £ y £ 31.
Write a Python code that determines if a given IPv4 address is Class A, B or C, or
none of them. The code is expected to get an IPv4 address from a user using the
input statement. It is expected to print a message indicating the network it belongs
to or indicating that it does not belong to any of them based on findings. You are
not supposed to use any built-in Python function that checks the validity of IP
addresses. Use the built-in string method, split, to extract the integer numbers in
an IPv4 address, put them in a list and check the validity of the numbers. Assume
that the user enters a valid IPv4 address consisting of four integer numbers
separated by dots so that the code does not have to check if it is properly entered.

Attachments05/04/2020 Lamar University Department of Electrical Engineering Semester: Spring 2020 Course: ELEN 5301 Python Programming Instructor: Dr. Cagatay Tokgoz Due Date: 05/08/2020 by midnight CST Attention: 1. Please submit your take-home final exam electronically through the Blackboard. E-mail submissions will not be accepted. 2. Please submit only one zip file including only Python codes with .py extension. There will be a separate .py file for each question in the zip file. Submissions in other formats will not be accepted. 3. Codes are expected to be clear, legible and compact with minimum number of lines and variables, and proper indentation. Variable names are expected to be appropriate, meaningful and self-explanatory. Codes will be graded based on these criteria. A correctly working code does not guarantee full credit. 4. Cheating/plagiarism is prohibited and will cause loss of points. Giving Python solution codes to someone else, or getting them from someone else or online resources is strictly prohibited. You are supposed to write your own codes. FINAL EXAM 1. (30 points) Private IPv4 addresses consist of 4 integer numbers separated by dots. They can have the following forms: • 10.x.x.x: Class A network • 172.y.x.x: Class B network • 192.168.x.x: Class C network where 0 £ x £ 255 and 16 £ y £ 31. Write a Python code that determines if a given IPv4 address is Class A, B or C, or none of them. The code is expected to get an IPv4 address from a user using the input statement. It is expected to print a message indicating the network it belongs to or indicating that it does not belong to any of them based on findings. You are not supposed to use any built-in Python function that checks the validity of IP addresses. Use the built-in string method, split, to extract the integer numbers in an IPv4 address, put them in a list and check the validity of the numbers. Assume that the user enters a valid IPv4 address consisting of four integer numbers separated by dots so that the code does not have to check if it is properly entered. 2. (30 points) Consider the recursive function, �(�), such that �(0.5) = √� and �(� + 1) = ��(�), meaning that �(1.5) = √�⁄2, �(2.5) = 3√�⁄4, etc. Write a Python code that computes this function for a given value of x. The code is expected to get a positive real number (float), x, that ends with “.5” (e.g., 8.5, 136.5, etc.) from a user using the input statement. It is expected to have a recursive function to compute �(�) and print it. Using a regular function instead of a recursive function will cause loss of points. Assume that the user enters a valid number so that the code does not have to check if it is properly entered. 3. (40 points) Consider the following function: �(�, �) = 2 √� 3(−1)5�6578 �! (2� + 1) ;<8 5=> = 2 √� ?� − �@ 3 + ⋯ + (−1);<8�6;<8 (� − 1)! (2� − 1) B Write a Python code that computes this function for given values of x. The code is expected to get a real number (float), 0 £ x £ 1, and a positive integer, k, from a user using the input statements. It is expected to compute �(�, �) and print it. You may directly use the math.factorial() function to compute the factorials in �(�, �). Start with �(�, �) = 0 and use a for loop with range(k) to add each term to the function in each execution of the loop. Assume that the user enters valid numbers so that the code does not have to check if they are properly entered.