Question: Python Programming You will be building an IP info provider. The program should continuously ask user to select an option from a menu until user

Python Programming

You will be building an IP info provider.

The program should continuously ask user to select an option from a menu until user picks q:

1 - lookup my IP address

2 - lookup info about specified IP

3 - lookup info for my IP address

q - quit

If user selects item 2, program should ask user to specify a valid IP and allows user to go back to main menu by entering q instead:

Enter a valid IP address or enter q to go back to main menu

The user input should be validated for the following:

  • menu item selection should be 1,2,3 or q or Q, program should not crash upon wrong menu item being entered and should only quit if q or Q entered
  • if user selects option 2, ask for IP address and it must be a valid IP address; user can enter q or Q instead of IP address to go back to main menu
  • if IP address entered is invalid, provide the feedback and let user enter IP address again or enter q to go back to main menu

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!