You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Penjelasan Program Validasi Nomor Telepon dengan Python
1
+
### English:
2
+
3
+
---
4
+
5
+
#### Phone Number Validation Program with Python
6
+
7
+
This program aims to provide detailed information about a phone number. By utilizing the `phonenumbers` library, the program can furnish details such as the location (timezone) of the number, service provider, country of origin, as well as validate and check the feasibility of the number.
8
+
9
+
#### How to Use:
10
+
11
+
1. Ensure you have installed the `phonenumbers` library.
12
+
13
+
Installation via pip:
14
+
```bash
15
+
pip install phonenumbers
16
+
```
17
+
18
+
2. Run the program and enter the phone number when prompted.
19
+
20
+
3. The program will display the following information:
21
+
- Location (Timezone)
22
+
- Service provider
23
+
- Country of origin
24
+
- Phone number validation
25
+
- Possibility of the number
26
+
27
+
#### Code Breakdown:
28
+
29
+
- Import necessary libraries:
30
+
```python
31
+
import phonenumbers
32
+
from phonenumbers import carrier, geocoder, timezone
print("Valid Mobile Number: ", phonenumbers.is_valid_number(mobileNo))
47
+
print("Checking the possibility of a number: ", phonenumbers.is_possible_number(mobileNo))
48
+
```
49
+
50
+
Note: Here `"en"` refers to the language code for English. For other languages, replace `"en"` with the appropriate language code.
51
+
52
+
---
53
+
54
+
### Bahasa Indonesia:
55
+
56
+
---
57
+
58
+
#### Program Validasi Nomor Telepon dengan Python
2
59
3
60
Program ini bertujuan untuk memberikan informasi detil dari sebuah nomor telepon. Dengan memanfaatkan library `phonenumbers`, program dapat memberikan informasi seperti lokasi (timezone) dari nomor tersebut, provider layanan, negara asal, serta memvalidasi dan memeriksa kemungkinan dari nomor tersebut.
4
61
5
-
### Cara Menggunakan:
62
+
####Cara Menggunakan:
6
63
7
64
1. Pastikan Anda telah menginstal library `phonenumbers`.
8
65
@@ -20,38 +77,31 @@ Program ini bertujuan untuk memberikan informasi detil dari sebuah nomor telepon
20
77
- Validasi nomor telepon
21
78
- Kemungkinan dari nomor tersebut
22
79
23
-
###Code Breakdown:
80
+
#### Penjelasan Kode:
24
81
25
-
-Import library yang diperlukan:
82
+
-Mengimport library yang diperlukan:
26
83
```python
27
84
import phonenumbers
28
85
from phonenumbers import carrier, geocoder, timezone
29
86
```
30
87
31
-
- Meminta user untuk memasukkan nomor telepon:
88
+
- Meminta pengguna untuk memasukkan nomor telepon:
print("Valid Mobile Number : ", phonenumbers.is_valid_number(mobileNo))
50
-
51
-
# Cek posibilitas sebuah nomor
52
-
print("Mengecek posibilitas sebuah nomor : ", phonenumbers.is_possible_number(mobileNo))
99
+
print("Valid Mobile Number: ", phonenumbers.is_valid_number(mobileNo))
100
+
print("Mengecek posibilitas sebuah nomor: ", phonenumbers.is_possible_number(mobileNo))
53
101
```
54
102
55
-
**Catatan:** Di sini `"id"` merujuk pada kode bahasa untuk Indonesia, jadi informasi akan ditampilkan dalam bahasa Indonesia. Untuk bahasa lain, Anda bisa mengganti `"id"` dengan kode bahasa yang sesuai.
103
+
Catatan: Di sini `"id"` merujuk pada kode bahasa untuk Indonesia. Untuk bahasa lain, Anda bisa mengganti `"id"` dengan kode bahasa yang sesuai.
104
+
105
+
---
56
106
57
-
Semoga membantu! Jika Anda memiliki pertanyaan lebih lanjut atau memerlukan bantuan tambahan, jangan ragu untuk bertanya.
107
+
Semoga bermanfaat! Jika Anda memiliki pertanyaan atau memerlukan bantuan lebih lanjut, jangan ragu untuk bertanya.
0 commit comments