A Simple Portfolio Project for Python Beginners

Danielle C. Wormley
Analytics Vidhya
Published in
3 min readJun 7, 2021

--

Photo by Joshua Woroniecki on Unsplash

I just received my first Python — related programming assignment from the Level Up in Tech bootcamp. Read along as I share details about this simple, yet very fun project, “Band Name Generator.”

As an aspiring DevOps engineer, I want to enhance my programming skills. Python is a very popular language and an increasingly sought — after skill by IT employers. To get better acquainted with Python, our team received directions to follow the “Band Name Generator,” example featured in Paul Zhao’s “Python 100 projects in 100 days — Learning Journal.” I made a few modifications with the instructions, yet we both achieved similar outcomes.

Materials:

1. Pre — installed 3. 9.5 on Windows 10

2. Visual Studio Code

3. The sampled “Band Name Generator” script:

The script we sampled from P. Zhao’s Python project.

Now, that we have all of our tools, let’s give this a go!

Once we open Visual Studio Code (VSC), we will create a file with this script and entitle it, “Band Name Generator.py” It’s critically important to save this file with the Python extension (.py). For one thing, saving it with the “.py” extension informs your Integrated Developer Environment (IDE) that you have created a Python file and it will allow modification of the file with the Python programming language. Otherwise, you’ll just have a text file.

A screenshot of the Band Name Generator file created with Python in VSC.

In viewing the screenshot, you will notice that some of the statements begin with a “#” character. Using the “#” symbols allows users to add comments, instructions or notes about the script that will not appear in an output nor print. For example, statement #1 in the screenshot directs us to “Create a greeting for your program.” We really don’t need to see this instruction display as part of the output.

You’ll also observe that some of the lines end with the “\n” symbol. In Python, we use the “\n” character to start a new line. For instance, we see that the two questions we ask the viewers each end with “\n” at the end of each line.

To separate our lines (or in this case, questions), add “\n” at the end of each statement.

Lastly, I want to point out the “+” symbol that appears on line eight.

Combining, also known as concatenating, strings to create a longer statement with the “+” sign.

In this final printable statement of the script, we combine, or in technical terms, concatenate, the strings from the responses in the fourth and sixth lines. We then take the fragment, “Your band name could be ” and add the “city” and “pet_name” strings to create a new and complete statement that displays our band’s possible name.

When I respond with the names of my hometown and pet, the script generates the following result:

My output from the Band Name Generator.

We have successfully run the “Band Name Generator” script and now have a really interesting band name. Hmmm. I’m not sure when Norfolk Benny will start doing shows or making records, but we’ve definitely completed our assignment. Now, we await more opportunities to learn Python.

Thank you for reading this post. On to the next challenge!

--

--

Danielle C. Wormley
Analytics Vidhya

Follow the growth of a career switcher who transitioned from public policy analysis to Cloud.