Python Lesson 3 – Classes and Duck Typing

Today we will be looking at the object orientation concepts available in Python. Python is an object-oriented language and offers much functionality that would be expected to come with such status. You can write classes, instantiate objects and inherit from other classes etc. Let’s start by declaring a class, this is done as so: ThenContinue reading “Python Lesson 3 – Classes and Duck Typing”

C Lesson 5 – Loops and Conditionals

Today we will be looking at loops and control statements in C. By this point, assuming you’ve followed the other tutorials on the blog, you should be very familiar with these structures. In C, we have access to: if else if else switch For our conditional statements. And then for our loops we have accessContinue reading “C Lesson 5 – Loops and Conditionals”

C Lesson 4 – Header Files

Up until this point we’ve been using header files that are provided as standard with C. But what if we wanted to make our own header with functions that we could then include in our other projects. Today we will be looking at this process. Firstly, we’ll want to create a header file and giveContinue reading “C Lesson 4 – Header Files”

R Lesson 2 – Loops, Conditionals and Apply

R, much like any language, has the capacity for looping/iterating. This means that we can work over a sequence of objects, performing operations, appending values etc. In R, loops can be declared like so: However, if you try and run this code, it may take some time. This is because loops are not very efficientlyContinue reading “R Lesson 2 – Loops, Conditionals and Apply”

Python Lesson 2 – NumPy and Pandas

Last time we looked at some data types we had available in Python as well as control structures, functions and overall indentation. Today we’re going to be looking at NumPy and Pandas. We’ll need to start by importing them which we can do as so. We can also abbreviate the name at import by doingContinue reading “Python Lesson 2 – NumPy and Pandas”

C Lesson 3 – Functions

Last time we examined the variable types available to us and discussed how there were many possibilities for things we could do with arrays. This time we’ll be putting some of these ideas and concepts into action by writing functions and demonstrating recursion. Declaring a function in C is done like so: It is veryContinue reading “C Lesson 3 – Functions”

C Lesson 2 – Data types

So last time we did “Hello World!”, a classic start in programming and the introduction I had when I started teaching myself C. This time we’re going to be looking at the variable types available in C. In C we have access to four main variable types: char int float double We’ve seen these beforeContinue reading “C Lesson 2 – Data types”

R Lesson 1 – Vectors and Matrices

Last time we got all set up in R and now we’re ready to start writing some scripts. Firstly, we’re gonna look at vectors. These are sequences of data elements that consist of the same basic type. We can declare them like so: And then we can even append to them too: These are thenContinue reading “R Lesson 1 – Vectors and Matrices”

Design a site like this with WordPress.com
Get started