Simple Financial Calculator.

In this post we will consider a simple financial calculator to see the effect of compounding interest, and also to estimate the number of years a particular sum of funds is able to last through retirement. The code will prompt the user to consider two scenarios, each with a starting amount, and the annual increment. […]

Assigning Exam Score.

Going one step back from the previous two posts (here and here), a Python code could be used to mark the answers submitted by students, returning the exam score for each student. With the data on hand, the distribution of the students’ choices for each question could be analysed, allowing the examiner to assess what […]

Assigning Exam Grades. Part II – Moderation

Following from the previous post, there might be instances where the user might need to change the cut-off scores for the various grades so that a desired percentage of students is obtained for each grade – also known as grade moderation. Let’s look at how the code from the previous post could be modified to […]

Assigning Exam Grades.

This post will be focusing on the bisect module available from Python. According to Python documentation, the bisect module provides support for maintaining a list in sorted order without having to sort the list after each insertion. This searching and insertion into a list can be used to assist with a common task that teachers/lecturers […]

Machine Learning. Classification with kNN.

This post will be looking at using the k-Nearest Neighbour (kNN) algorithm for a classification problem. Suppose there is a new data point that is required to be classified into one of the known categories that comprises the data. This algorithm will look at the k closest points (where k is an integer specified by […]

Interactive Data Visualisation. Bokeh.

Data visualisation allows complex relationship between parameters of a dataset to be understood easily and quickly. The Matplotlib package is a common and convenient Python package for data visualisation. However, let’s take a look at another Python package called Bokeh, as it allows the user to do a bit more. Publicly available HDB resale prices […]

Managing Laboratory Inventory (Consumables).

An adequately stocked consumables inventory is essential for the smooth operation of any research laboratory. Someone in the lab needs to take on the task of the regular trips to the lab store to replenish a trolley-load of consumables, lest face the wrath of fellow lab users. In academic research labs, there is usually a […]

HPLC Calibration Curve and Data Analysis.

One common analysis a chemist does in a laboratory is the use of high performance liquid chromatography (HPLC) to determine the concentration of a particular analyte. After the method development is complete, a typical workflow for sample analysis is as follows:i) Measurement of the peak areas of various known concentration of the calibration standard.ii) Plot […]