loading...
Cover image for 100 Days Of Python: Days 1 through 5

100 Days Of Python: Days 1 through 5

redlotusdesignz profile image Diana Chin Originally published at thecodingcow.com ・3 min read

Hello, everyone! I decided to start my 100 Days Of Python series as a way of logging my progress on relearning the basics of Python. The last time I’ve worked on Python was when I was in college. Since I’m interested in automation as well as improving on my game apps, I figured it’ll be a great way to strengthen my programming skill. My hope is that by the time I finish the challenge, I’ll be able to have a better understanding of the language.

Without further ado, here’s my progress on the first five days of the challenge.

Day 1: Band Name Generator

Python-Day1.gif

Getting into the basics such as variables and combining string texts were a breeze. I did learn about utilizing f-strings when adding variables in your printed statements. Created a fun band generator that simply joins the two inputs into one statement.

Day 2: Tip Calculator

Python-Day2.gif

The tip calculator project was a fun way of utilizing mathematical expressions, especially when calculating percentages and remainders. Not to mention, working with floats and how to round off numbers. This project asks for three inputs: the total amount of the bill, how many people to split the bill, and the tip percentage you want to give.

Day 3: Cow Island Text Adventure Game

Python-Day3.gif

Learned about if-else statements and how they can be nested when making choices, depending on the user’s input. I have to admit, the indentation of the nested statements made me confused at first. What helped was creating a diagram that determines the logic flow of how the if-else statements are conducted. I had fun making the Cow Island game as it reminded me of my visual novel game development where you had to pick and choose your own adventure.

Day 4: Rock Paper Scissors Game

Python-Day4.gif

Learned about using the random() module, creating arrays, and how to utilize them for the rock, paper, and scissors project. It involved using nested statements, some ASCII art, and making the computer provide a random choice to indicate if you win or lose the game. One thing I could’ve improved on the project was adding a statement that lets the users know that if they inputted an incorrect number or provided a letter, they would receive an error from the program.

Day 5: Password Generator

Python-Day5.gif

So far, I think Day 5’s project in creating a password generator was a proud moment of mine. This project utilizes for loops, along with lists and the random() module. The option to make it easy was on the table in terms of simply joining the inputs into one. For example, the easy way would’ve had the output “abc!%$123”. However, I wanted to take it one step notch by using the random.shuffle() function to shuffle the contents from the list and therefore, output the password in an entirely different order. Some of the letters, symbols, and numbers may be duplicated in the end result, but that’s due to the random.choice() function when it was passed through the for loops.

That’s all for now!

I anticipate my next article will cover Days 6 through 10 in about a week or so, assuming that life events or anything strange won't get in the way 😂 If you happen to like this article, feel free to share and tweet at me on your thoughts.

Discussion

pic
Editor guide
Collapse
mccurcio profile image
Matt Curcio

MAN o' man, I love the tiny vids of your cli. Wow, that is so simple and yet fun, cuz it is kind-of-interactive. Does your video software have an option to only show the content inside a window like your terminal? Does your video software produce gifs or is that an extra step?
Thanks ;)

Collapse
redlotusdesignz profile image
Diana Chin Author

Thanks for checking out my article! I use Monosnap to record my Python demo projects (currently hosted on Repl.it) and save them as GIFs.

Collapse
patricktingen profile image
Patrick Tingen

I like the ascii art of the cow :) This sounds as a fun project, where can I find this challenge and is it free / paid?

Collapse
redlotusdesignz profile image
Diana Chin Author

Thanks for checking out my article! This challenge is part of the course I'm taking from Angela Yu's Udemy course "100 Days of Python."

Collapse
bketelboeter profile image
Brian Ketelboeter

maybe I will mirror this and write a '100 days of learning python' blog myself

Collapse
redlotusdesignz profile image
Diana Chin Author

Thanks for checking out my article!