Okay, so I was messing around with some code today and I thought, “Wouldn’t it be cool to have a Harry Potter name generator?” I mean, who hasn’t tried to come up with their own wizarding world name at some point? So, I dove in.

First, I needed some lists to work with. You know, a bunch of first names and last names that sound kinda British-y and magical. I started by just brainstorming and writing down names I could remember from the books and movies.
- For first names, I jotted down things like “Albus,” “Minerva,” “Severus,” and, obviously, “Harry.”
- Then for last names, it was stuff like “Potter,” “Granger,” “Weasley,” “Malfoy,” and “Longbottom.”
I figured that was a decent starting point. I could always add more later, right?
Next, I got to the actual coding. I wanted something super simple, so I used Python, nothing too fancy and complicated . Basically, I just made two lists, one for first names and one for last names.
The core was just to randomly select one and combine them!
I wrote a little bit of code that would randomly pick a first name from the first names list, and then randomly pick a last name from the last names list, and then just stick them together with a space in between. Super basic, but it works!

I ran the code, and boom! Out popped a name. The first one I got was something hilarious, and then after a few more tries, some were cool, and some were just plain goofy. But hey, that’s part of the fun, right?
I played around with it for a while, generating all sorts of wizarding names. Some of them sounded like they could totally be real characters in the Harry Potter universe, and others… well, let’s just say they were unique.😂
It’s not perfect, obviously. I could definitely spend more time refining the lists, maybe adding some more unusual or obscure names. Or even adding a way to choose a middle name, for the really dedicated wizards out there! But as a quick little project, it was a blast. It gave me good practice, and I had a good laugh, so I call that a win.