LPTHW - Exercise 15: Reading Files

LPTHW - Exercise 15 This is an interesting lesson. It may take a few minutes to get the mental abstraction of what is going on with the open() and read() commands. Open and read? When we work with and open files ourselves in something like a text document, we associate 'open' with 'read' i.e. we as humans read the file immediately as it opens, so we can do stuff with it.

Read more...

LPTHW - Exercise 14: Prompting and Passing

LPTHW - Exercise 14 Not much to say about this one. We've done this stuff lots of times. I guess the only slightly different thing is creating a variable for what we're going to put inside the input() function. There are a couple things required to do in the study drills that change the initial script, so you'll see mine below doesn't specifically match the one on the lesson plan.

Read more...

Odin Project - an update

Yikes, been a while since an Odin Project update was posted here! In the intervening months I've not progressed too far with the course, in fact I am still going through the JavaScript section just after the Google Homepage build. That sounds worse than it is as I had to alter the course to fit my learning style. Understanding, not just doing I need to understand the theory behind what I do if I'm to do the best I can, and when I jumped into the JaveScript track on Codecademy, I could instantly tell I wan't going to get out of it what I needed.

Read more...

LPTHW - Exercise 13: Parameters, Unpacking, Variables

LPTHW - Exercise 13 OK then, new stuff here. Turns out I'd heard of this before but they were called libraries. Consequently it took a few minutes to complete the mental abstraction as to what these features/modules as Zed calls then actually are. This is the first bit I've come to and thought "Oh, this is the interesting stuff". I really hope to get through these lessons to the first test and move on to the stuff I've never heard of/encountered.

Read more...

LPTHW - Exercise 12: Prompting People

LPTHW - Exercise 12 Turns out I jumped the gun a little with that extra form I made last time for the Study Questions. This lesson covers the way I made that form... age = input("How old are you? ") height = input("How tall are you? ") weight = input("How much do you weigh? ") print(f"So, you're {age} old, {height} tall and {weight} heavy.") Learn Python the Hard Way - Study Drills 1.

Read more...

LPTHW - Exercise 11: Asking Questions?

LPTHW - Exercise 11 Yay! Some new stuff! I must admit, this first section is getting a little tedious so it's nice to have something new now. It's a common thing with programming tutorials, they all start of with such simple things and take ages to get past them. I think it's been a factor in why it's taken me a while to really want to learn to code.

Read more...

LPTHW - Exercise 10: What was that?

LPTHW - Exercise 10 I'm not sure exactly where, probably when butchering a Regex command, but I'd already encountered escape characters prior to the last exercise. It's obviously a very useful thing to learn, but coming back to it now I can't imagine not knowing what they are, how to look them up, and ultimately how to use them. That's one of the best feelings during the learning process!

Read more...

LPTHW - Exercise 9: Printing, Printing, Printing

LPTHW - Exercise 9 Simple copy and print here but a few things we haven't seen before - namely those \n things in the months variable string. When running the script the output on the months variable are displayed on separate lines, so those \n things obviously indicate a newline/carriage return be inserted. I guess this is a way to get new lines on a string enclosed by single or double quotes, i.

Read more...