You will write three functions that read network addresses.
Your tasks.
split_mac, return a pair: the manufacturer code (the first three pairs) and the serial code (the last three pairs), each joined with colons.mac_bits, return the MAC address as a string of 48 binary digits.is_ipv4, return True only for four denary numbers from 0 to 255, separated by dots.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…