|
| 1 | +''' |
| 2 | +python random name generator module |
| 3 | +author : codeperfectplus |
| 4 | +language : python 3.0 ++ |
| 5 | +github : codeperfectplus |
| 6 | +''' |
| 7 | +import random |
| 8 | +first_names = ['John', 'Jane', 'Corey', 'Travis', 'Dave', 'Kurt', 'Neil', 'Sam', 'Steve', 'Tom', 'James', 'Robert', 'Michael', 'Charles', 'Joe', 'Mary', 'Maggie', 'Nicole', 'Patricia', 'Linda', 'Barbara', 'Elizabeth', 'Laura', 'Jennifer', 'Maria','Adam','Sturt','Nikolson','Tom','Harry','Ruskin'] |
| 9 | +last_names = ['Smith', 'Doe', 'Jenkins', 'Robinson', 'Davis', 'Stuart', 'Jefferson', 'Jacobs', 'Wright', 'Patterson', 'Wilks', 'Arnold', 'Johnson', 'Williams', 'Jones', 'Brown', 'Davis', 'Miller', 'Wilson', 'Moore', 'Taylor', 'Anderson', 'Thomas', 'Jackson', 'White', 'Harris', 'Martin','Potter'] |
| 10 | +street_names = ['Main', 'High', 'Pearl', 'Maple', 'Park', 'Oak', 'Pine', 'Cedar', 'Elm', 'Washington', 'Lake', 'Hill'] |
| 11 | +fake_cities = ['Metropolis', 'Eerie', "King's Landing", 'Sunnydale', 'Bedrock', 'South Park', 'Atlantis', 'Mordor', 'Olympus', 'Dawnstar', 'Balmora', 'Gotham', 'Springfield', 'Quahog', 'Smalltown', 'Epicburg', 'Pythonville', 'Faketown', 'Westworld', 'Thundera', 'Vice City', 'Blackwater', 'Oldtown', 'Valyria', 'Winterfell', 'Braavos', 'Lakeview'] |
| 12 | +states = ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'] |
| 13 | + |
| 14 | +first = random.choice(first_names) |
| 15 | +last = random.choice(last_names) |
| 16 | + |
| 17 | +phone = f'+91-{random.randint(800, 999)}{random.randint(800, 999)}{random.randint(1000,9999)}' |
| 18 | + |
| 19 | +street_num = random.randint(100, 999) |
| 20 | +street = random.choice(street_names) |
| 21 | +city = random.choice(fake_cities) |
| 22 | +state = random.choice(states) |
| 23 | +zip_code = random.randint(10000, 99999) |
| 24 | +address = f'{street_num} {street} St., {city} {state} {zip_code}' |
| 25 | +email = first.lower() + last.lower() + '@bogusemail.com' |
| 26 | + |
| 27 | +class Name: |
| 28 | + def __init__(self,num=1): |
| 29 | + ''' |
| 30 | + num = Total No. of Name You Want |
| 31 | + ''' |
| 32 | + self.num = num |
| 33 | + |
| 34 | + def first_name(self): |
| 35 | + for i in range(self.num): |
| 36 | + print(f'{first}') |
| 37 | + |
| 38 | + def last_name(self): |
| 39 | + for i in range(self.num): |
| 40 | + print(f'{last}') |
| 41 | + |
| 42 | + def full_name(self): |
| 43 | + for i in range(self.num): |
| 44 | + print(f'{first} {last}') |
| 45 | + |
| 46 | + def full_profile(self): |
| 47 | + for i in range(self.num): |
| 48 | + print(f'{first} {last} \n {street_num}-{street} {city}-{state}\n{zip_code}\n{phone}\n{email}') |
| 49 | + |
0 commit comments