Skip to content
← Back to Community
Phone number detection
Profile icon
prat07

This simple program lets you know the country and carrier of the phone number being inputted by you. To use this program all one needs to do is input a valid phone number with the country code in the beginning. The program then returns the country code and the carrier of the phone number which was entered.

The code for this program contains just one module which is the 'phonenumbers' module. This module allows users to do many different things with phone numbers e.g., check if the phone number is valid, check the country it belongs to. I tried to make the program uncrashable due to incorrect user inputs by using multiple while-loops and place-holder variables; in other words, while loops here check if user input is a valid phone number.

Please refer to the code for a better understand, thank you.

Voters
Profile icon
Elmaysto
Profile icon
prat07