-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPhoneNumberGenerator.py
More file actions
51 lines (43 loc) · 1.23 KB
/
PhoneNumberGenerator.py
File metadata and controls
51 lines (43 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
##Generates Nigerian phone numbers
import random as r
while True:
try:
userType = input('''----------------------------------------------------
Phone Number Generator
-----------------------------------------------------
Enter the type of network provider you want from the list below:
1) GLO
2) MTN
3)AIRTEL
Enter here: ''')
print()
user = eval(input('Enter the amount of phone numbers you want: '))
print()
Glo_header = ['0807', '0706', '0903']
Mtn_header = ['0812', '0906', '0806']
airtel_header = ['0812', '0907', '0809']
if userType == "1":
print("THESE ARE YOUR NEW GLO NUMBERS")
for i in range(1,user+1):
a = r.choice(Glo_header)
b = r.randint(1000000,9999999)
print(i, f">> {a}{b}")
elif userType == "2":
print("THESE ARE YOUR NEW MTN NUMBERS")
for i in range(1,user+1):
a = r.choice(Mtn_header)
b = r.randint(1000000,9999999)
print(i, f">> {a}{b}")
elif userType == "3":
print("THESE ARE YOUR NEW AIRTEL NUMBERS")
for i in range(1,user+1):
a = r.choice(airtel_header)
b = r.randint(1000000,9999999)
print(i, f">> {a}{b}")
else:
print("invalid input")
print()
input("Press enter to continue...........")
print()
except Exception as e:
print(e)