Replying to Avatar Delta Charlie

import random

'''

Generates a list of 30 names that have a historical sound to them

'''

# Lists of first and last name components

first_names = ["Abraham", "Eleanor", "Winston", "Isadora", "Theodore", "Amelia", "Leonardo", "Catherine", "Napoleon", "Evelyn",

"Cleopatra", "Graham", "Josephine", "Albert", "Charlotte", "Frederick", "Victoria", "Benjamin", "Isabella", "Alexander"]

last_names = ["Lincoln", "Roosevelt", "Churchill", "Da Vinci", "Roosevelt", "Earhart", "da Vinci", "Bonaparte", "Bonaparte", "Hawking",

"Cleopatra", "Bell", "Bonaparte", "Einstein", "Bronte", "Chopin", "Windsor", "Franklin", "Ferdinand", "Hamilton"]

# Generate a list of 30 random names

generated_names = []

for _ in range(30):

first_name = random.choice(first_names)

last_name = random.choice(last_names)

full_name = f"{first_name} {last_name}"

generated_names.append(full_name)

# Print the generated names

for i, name in enumerate(generated_names, start=1):

print(f"{i}. {name}")

Avatar
utxo the webmaster 🧑‍💻 2y ago

Thanks ChatGPT

Reply to this note

Please Login to reply.

Discussion

Avatar
Delta Charlie 2y ago

For this one, yes. But we do create code for ourselves from scratch as well. Always interesting to see what the tool produces.

Thread collapsed