Posts

Showing posts from March, 2017

Learn how to code with python: Lesson 4 - Reading and writing files

Image
One of the most useful things to know how to do when just learning how to program, is knowing how to read and write text files. In this video I show you how to do just that.

Example code from the video:



>>> f = open('Desktop/lorumipsum.txt')
>>> print(f)
<_io.TextIOWrapper name='Desktop/lorumipsum.txt' mode='r' encoding='UTF-8'>
>>> f.readline()
'Lorem ipsum dolor sit amet,....

>>> f.read()
'\nEtiam rhoncus....
...metus at tortor pulvinar varius.\n'
>>>
>>> f = open('Desktop/lorumipsum.txt')
>>> f.readlines()
['Lorem ipsum dolor...


Learn how to code with python: Lesson 3 - Working with numbers

Image
Below is lesson number 3 in the series: Learn how to code with Python. In  this lesson I explain the basic things you need to know to start working productively with numbers in Python.

In the video I talk about the different types of numbers:

Integers, or int in PythonFloating point number, or float in Python
You can use the python type() function to see the type a number holds.

Learn how to code with python: Lesson 2 - Working with text

Image
In this lesson I show you how you can work with text. Text in programming lingo is also referred to as a string. And a string can be described as a group of characters. A character can be a letter, a number, a space, a comma, a point, a hash (#), etc.. So far, so good ...

Learn how to code with python: Lesson 1 - Hello World!

Image
In this first lesson of my free video course: Learn how to code with Python, you will write your first python program. You may think that the program isn't much, but actually it is a big step to get code to run for the first time in a new programming language. It is also kind of a tradition that whenever you are introduced to a new language you start with printing a message to the screen, that says: "Hello World!".

Learn how to code with python video course

Image
Below is an intro to my free mini video course:

Learn how to code with PythonIn this course I will teach you basic coding skills using the Python programming language. I believe that anyone should learn how to code. Coding / Computation is all around us and you will understand more of the worldaround you if you know how to code. It is not my intention to make everyone a software developer,  but coding is a skill like reading and writing. And it can be a lot of fun as well.