A simple program to generate random names using Python programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGgThank you very much for your support.

Program Listing

import random

first = ["Kai", "Hunter", "Luca", "Quinn", "River", "Skylar", "Hayden", "Riley", "Reese", "Jude"]
middle = ["Abbot", "Griffith", "Maxfield", "Rufus", "Eva", "Emma", "Olivia", "Sims", "Tan", "Ovilda"]
last = ["James", "Doha", "Harden", "Jordan", "Bryant", "Williams", "Simmons", "Imbid", "George", "Leonard"]
namebank = []
while True:
    name = input("Do you want to generate a new name? [y/n]: ")
    if name.upper() == "Y":
        rand = random.randint(0, 4)
        randname = first[rand] + " " + middle[rand] + " " + last[rand]
        namebank.append(randname)
        print(f"Your new name is {randname}\n")
        continue
    elif name.upper() == "N":
        print("Thank you!")
        print("List of generated names:")
        for x in namebank:
            print(f"{x}")
        break

Leave a Reply

Your email address will not be published.