I'm quite new to Python.
#Amount of numbers wanting to be generated
numbers = str(int(input("How Many Numbers Do You Want To Generate: ")))
Number1 = int(numbers)
Number2 = int(numbers)
Number3 = int(numbers)
print("---------------------------------------------")
#generator values
gentype = "0123456789"
Telstra = "4001", "4002", "4003", "4004", "4005", "4006", "4007", "4008", "4009", "4601", "4609", "4800", "4901", "4909", "4910", "4914", "4920", "4929", "4070", "4079", "4080", "4089", "4090", "4099", "4170", "4179","4180", "4189", "4190", "4199", "4270", "4279", "4280", "4289", "4290", "4299", "4470", "4479", "4480", "4484", "4971", "4979", "4980", "4989", "4990", "4999"
Optus = "4010", "4019", "4020", "4029", "4030", "4039", "4110", "4119", "4120", "4129", "4130", "4139", "4810", "4819", "4340", "4349", "4350", "4359"
Vodafone = "test"
#generator code
if carrier == "1":
for i in range(Number1):
generatestarted1 = random.choice(Telstra)
generatestarted2 = random.choice(gentype)
generatestarted3 = random.choice(gentype)
generatestarted4 = random.choice(gentype)
generatestarted5 = random.choice(gentype)
generatestarted6 = random.choice(gentype)
generatestarted = ("+61"+generatestarted1+generatestarted2+generatestarted3+generatestarted4+generatestarted5+generatestarted6))
print(generatestarted)
savenumbers = open("TelstraPhoneNumbers.txt","a").write(generatestarted+"\n")
elif carrier == "2":
for j in range(Number2):
generatestarted1 = random.choice(Optus)
generatestarted2 = random.choice(gentype)
generatestarted3 = random.choice(gentype)
generatestarted4 = random.choice(gentype)
generatestarted5 = random.choice(gentype)
generatestarted6 = random.choice(gentype)
generatestarted = ("+61"+generatestarted1+generatestarted2+generatestarted3+generatestarted4+generatestarted5+generatestarted6)
print(generatestarted)
savenumbers = open("OptusPhoneNumbers.txt","a").write(generatestarted+"\n")
Output:
Aucun commentaire:
Enregistrer un commentaire