+254 728 680 519

Downloading and installing Python

There are several ways to get your own copy of Python 3, depending on the operating system you use. Linux users most probably have Python already installed - this is the most likely scenario, as Python's infrastructure is intensively used by many Linux OS components. For example, some distributors may couple their specific tools together with the system and many of these tools, like package managers, are often written in Python. Some parts of graphical environments available in the Linux world may use Python, too. If you're a Linux user, open the terminal/console, and type: ‘python3’

Read more

Data types and Objects Part 4

We need to finish up on oop so here it goes. We have collected a bunch of attributes from our model you can call it a database, same meaning because that's where we are getting our data from. Also note that this is only the scratch of the surface, in an actual system what we have as engine attribute e.g horsepower would not have been hardcoded as done here. Most likely this data might be fed using an API which leads to the world of REST frameworks which we will start looking at later. So we need to extract that data and do some functions with it to get the stats about the three cars. Let's start with the  ‘acceleration_0_60_mph’ in seconds attribute. Now that we are more used to kilometers than miles, let's convert to something we can relate to.

Read more

Data types and Objects Part 2

Welcome to the second post of this 3 part series discussing data types and objects. Well well! To be honest, trying to squeeze object-oriented programming (from now on I will use oop) to only 3 posts is a hard task because the topic is so wide but the point here is just to get you started. I will give you more links for further reading once we are done. We will start where we left off. I had asked you what changed in our post. (Link)?

Read more