Final answer:
To create a modular Python application, you need to create a main function with a top-level scope check, a function to validate the device's network status, and a function to prompt for and validate the IP address. The IP address validation should include a check for letters.
Step-by-step explanation:
In order to create a modular Python application as requested, you can follow these steps:
- Create a main function that will serve as the entry point for your program. This function should contain a top-level scope check to ensure that it is being executed directly and not being imported as a module.
- Create a function that will validate whether the device is on the network. This function can use various methods to check the network status, such as pinging a known IP address or using a network library to check for active connections.
- Create a function that will prompt for, get, validate, and return the IP address. This function should include a validation check to ensure that the IP address does not contain any letters.