100 Days of Python, Projects 1-14 #100DaysofCode
I’ve mentioned before about the concept of “always learning”. One of those thing is coding. I’d like to think I’m actually pretty good at basic to intermediate level coding, though I am certainly not an expert. I kind of feel like I am at a point where I would definitely like to “level up” my ability a bit. So I’ve been working on the #100DaysOfCode Challenge, though a course on Udemy. Specifically, 100 days of Python, and specifically, this course.
I’ve also been using this as an good excuse to sharpen up my Github skills a bit, so you can follow my progress along in my Github Repository. I also figure I could talk about about some of my though processes and flow here as well, though some of the projects are very simple, so there may not be a lot to say about them specifically. Especially since, frankly, I am already beyond the “Beginner Level” of this course.
I thought about making a post for each module, but that’s kind of overkill as well, so instead I’ll just break it up a bit across maybe the skill levels, or whenever I feel like it.
Project 1 – Band Name Generator
This one is pretty basic, and basically, the same sort of thing you see on Facebook trying to steal your information. I promise I’m not trying to steal your data though. It takes some simple inputs, the city you were born in, your pet’s name, and outputs them as a combination for a “Band Name”. You can really put anything you want into these fields and it will just combine them. Maybe a fun alternative would be to use the letters of the words entered, to pull a different word from a list or something.
Project 2 – Tip Calculator
This one is mildly more complicated than the Band Name Calculator, but it is still just input fields, but this time, with MATH! You enter the total bill, how much to tip, how many people ate, and it splits the bill among the various people evenly. Be sure you order the steak dinner, so your salad eating friends can foot part of the bill for your expensive steak.
Project 3 – Treasure Island Game
I really enjoyed this one, maybe a little TOO much. The core project is just practice on “if, elif, else” statements. You build a little “choose your own adventure” game. Like a very simple Zork Game. I kind of just kept getting goofier and goofier with the descriptions though. I guess that’s the “writer” part of my personality or something.
Project 4 – Rock Paper Scissors Game
Pretty straight forward, and mostly a practice for random numbers. A rock paper scissors game. One part I like about this game though it that it introduces the idea of using ascii graphics. I mean, the core idea is simple, but in all the various online coding classes I have done, none have done this sort of thing. It really helps these little projects feel way less mundane.
Project 5 – Password Generator
More random number practice, this one actually is probably the most actually useful project so far. You enter how many letters, numbers, and symbols you want for a password and well, it generates it, randomly. Especially useful because strong passwords are good to have. Though using a random password, you probably will want a password keeper, and well, most of those include a random password generator.
Project 6 – Escaping the Maze
Project 6 was a little different, since it wasn’t strictly writing pure code, but instead was using a site called Reborg’s World. https://www.reeborg.ca/index_en.html This site has a few puzzles where you use functions to navigate a little robot through some challenges. It’s purpose is to help the learner get better at logic puzzles mostly. It was interesting and I’ve made a note to go back and do the rest of the puzzles at some point.
Project 7 – Hangman Game
Hey, another game. This one is honestly, pretty full featured, at least for what it’s supposed to be. It’s still an ASCII based CLI game but it works like Hangman. Guess the letters, your little man slowly gets hung. Better save him.
Project 8 – Caesar Cypher
This round is essentially just a sort of “intro to cryptography,” that I feel like may come back around in a later lesson. This program builds a basic Caesar Cypher. You enter some text, pick a Cypher, then it just rotates each letter by the number of letters equal to the Cypher number. It also lets you decode the messages.
Project 9 – Secret Auction
This one was kind of neat, though not overly complicated. Essentially, you enter your name, place a bit, if there are more people, they do the same, then it announces who the highest bidder is. My main frustration from this project. It’s suggested you clear the screen between bidders. Simple enough. but it turns out that Python doesn’t really have a built in clear function. The samples run on the Replit website, and you have to import a special library from Replit. This doesn’t work in my local VS Code interpreter. I looked into this, I could write a custom include for it, but it would only work in Windows, or Mac, or Linux, not all three. Because it’s essentially a command specific to each OS’s respective shells.
Super annoying.
Project 10 – Calculator
This would almost be really cool, if it were actually clickable and not just something you type numbers and operators into. Still, it’s one of my favorites I think in the end, because it introduces a really interesting and neat concept involving Dictionaries. Specifically, you have a dictionary
operations = {
"+": add,
"-": sub,
"*": mult,
"/": div,
}
You can use the key, to assign it’s value to a variable, then call that variable, as the name of a function. The names inside the dictionary all match the names of functions. Really slick. Feels like it reduces code readability quite a lot though.
Project 11 – Blackjack Game
This project was alright to do but it’s a little disappointing because it fakes the cards but just using value. It doesn’t handle Aces properly, it doesn’t handle splits or anything. The one mistake I made, that I fixed, originally, I had set it up so the Dealer would always “Hit” of it was below the player score. Except the dealer wouldn’t know what cards the Player had to know the player score.
Also there is not actual betting, which could make things more interesting I suppose.
Project 12 – Number Guesser
This one almost feels a bit like a filler project, since it’s a pretty straight forward if else level project. I will also add that the hard mode gives you 5 guesses, which feels extremely low. The logical method is halving things, so 100 -> 50 -> 25 -> 12 -> 6, so you essentially have a 1/6 chance of getting the answer.\
Project 13 – Debugging
No actual projects on day 13, so maybe it’s not actually “100 Projects in 100 days”. except several of the days have what are two to three projects, so I am sure it makes it up somewhere. Day 13 was revisiting 3 old projects, using different methods of debugging the code provided.
Project 14 – Higher Lower Game
This game was presented as if it’s super commonly know but I had never heard of it. It’s almost a variation of the whole Facemash/Hot or Not Idea, but with less focus on looks. Int he example shown from the web, it uses number of Google Results for a topic, in this version it uses number of Instagram Followers. The user is presented with two celebrities, and they have to guess which has more Instagram Followers.
It’s all pulled from pre built data, so it’s not current follower counts. I could see this making a return when the course gets into the Web Scraping portions.
And that’s the end of the “Beginner Section”. The course has several sections, Beginner, Intermediate, Intermediate +, some Web training, Advanced, and Professional. Most of what I’ve done so far is not really anything new. i could have worked most of these out. I’ve actually been spicing them up a bit with my own bits to make things more robust, like most of the inputs have some level of input check to ake sure it’s value. Like is it a number, or did the user enter “t” or “T” or “True” or “true”.
I’m more looking forward to the next sections as it gets into GUI style training.