Alright, Let’s Learn a Thing

Recently, I’ve been more interested in learning different skills that are actually useful to what I’m doing now. I get frustrated with school work sometimes, because it seems so separate from what I do daily. I’ve been lucky because I got a job at a machine shop recently, and my boss and coworkers have been kind enough to start teaching me how to do what they do there and are trying to help me become a productive, efficient member of the team. It’s great! Additionally, I’ve got a great network of friends and family that are really good at doing useful stuff and most of them are willing to let me watch and sometimes help. It’s been fun.

But today,  I’ve got a book called “Sams Teach Yourself Python in 24 Hours”. So we’re gonna try this and I’m going to share my experience for every hour (the book is literally organized by hour)

Hour 1

This was an easy hour! It only took me 30 minutes anyway. All about syntax, installing and learning how to move around. Now I know how to create a new directory (this is what the computer calls folders) without being in File Explorer!

It’s the typical “Hello world!” Example,  and look I did it!

Hello World

Hour 2

MATH. This chapter is all about using mathematics in Python. I used almost all of this information in the basic coding class I took two semesters ago, but it’s a good refresher. It’s also got a lot of great tables to show how the operators work. Yay! (Also, this one didn’t take an hour!)

Hour 3

I’m pumped. This one is about logic and I had the hardest time with it the first time around. Woo. Let’s go.

—A little over an hour later–

Ow. Logic is not always the easiest thing for me to understand and this was no exception. While this book made a good effort to simplify and show examples, it’s still hard to process every point in a path where something could change the output.

But, we did learn about if/else statements, including an elif, and try/except statements, which apparently help direct your code. Yay!

Hour 4

 This one took about an hour,  I learned about how to get information out of strings! And now I’m a little better at it. I did spend the most time trying to figure out the exercise at the end of the chapter…. it says:

In your program, you’re given a string that contains the body of an email. If the email contains the word “emergency” print out “Do you want to make this email urgent?” If it contains the word “joke”print out “Do you want to set this email as non-urgent?”

It won’t let me add an image to show you what I did, but long story short, I was missing colons between lines and it took me 20 minutes of heavy investigation to figure it out…. yay. You’ve gotta be really good at picking out tiny details to be any good at this coding thing.

Hour 5

I have learned that: raw_input ( ) > input ( ) 

And making sure the user data is appropriate is key. This hour had 2 exercises, and they took a total of 30 minutes, but they were really good practice!

The first exercise was editing a script from the book, and the second one required writing a program for shopping that asked for the buyers name, what they’d like to buy, the total price and an ending “Thank you!” tab.



And when it runs, it looks like this:

Run Program

I am so proud of this.  Yay hour 5!

Hour 6

I AM LEARNING. This time I made a program that asks for pizza toppings and tells you if it’s in stock. I feel like a smart cookie but I know it’s really not all that complicated but still…. it looks cool!

Pizza toppings!

And it prints like so:

pizza output.JPG

Hour 7

I put so much time into this hour. It took me about 2 hours instead of the suggest 1, loops are difficult, but it keeps stating how important they are so I felt it necessary to really try and understand them. But now my brain hurts. Ow. But look at this pretty program I made.


And the output…

Receipt output

Why is this so tedious?

Hour 8

I got stuck and I read some pretty poor reviews about the book I’m using. That combined with the fact that the answers to the exercise aren’t available and I’m not comfortable continuing until I figure this one, I think I’ll put this book on pause. But! I have another book! I’ll make a different post for that one though….