Learning the hard way

I’m beginning my journey to learn the art of programming with Learn Python the Hard Way and Learn Ruby the Hard Way. I have some experience with these languages from playing around with them, thinking about an idea and then creating it by trial and error. However, I thought it would be useful to take a course. The Learn the Hard Way series comes with a free online book and videos which you can purchase for a reasonable fee. I’m using just the free online book since I learn better by reading and doing as opposed to watching videos and doing.

Why Learning the hard way? The author states that he uses this description because he tells you to do something and you learn that concept by typing in the example and running the program. You learn through exercises and repetition. It is not a glamorous approach. He doesn’t use animation, graphics, games, gamification, etc., but an old, traditional method that works. I’ve taught English as a Second Language from time to time, and I’ve learned that while technology is an excellent tool, one of many tools, sometimes the old methods work just as well. Memrise and DuoLingo incorporate repetition effectively. According to the introduction of Learn Python the Hard Way:

All you need to do is:

  1. Go through each exercise.
  2. Type in each sample exercise.
  3. Make it run.

I’ll add a fourth step.

  1. Play with and modify the code. You can learn a lot by playing with the code. Don’t be afraid to explore and don’t be scared of error messages.

I deviate a bit from the course by using Python3.4.3 and the IDLE. I’m comfortable with the command line interface and wanted to learn the latest version.

The first lesson explores the print function. You write a program that prints out a variety of lines of text. What is interesting is that you have the liberty to use either single or double quotes.
.print1.JPG

This makes it easy to add quoted textprint2.JPG.

In a later lesson, I learned about the comma separator that makes it easy to mix text in the print function with arithmetic operations and/or variables
print3.JPG

 
0
Kudos
 
0
Kudos

Now read this

Scratch and Python

There are many reasons to have children learn the basics of coding. The goal is not to set the foundation for your child to become a programmer. If they want to, fine, but learning to code provides other benefits. It teaches logical... Continue →