Password Generator.

If you are searching for ideas for a Python mini project on the internet, this would be one of the common search results. This is my take on a simple programme to generate passwords. A password that is considered to be of sufficient complexity typically consists of the following:– At least 1 upper case letter […]

Blackjack Score Calculator.

I was trying out some Python problems on Codewars (www.codewars.com) when I came across this interesting problem titled ‘Blackjack Scorer’ posted by a user called ‘jodymgustafson’. I find this problem interesting because there is a conditional involved when determining the value of an ‘Ace’ card, where it can either take a value of 1 or […]

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 […]

Travelling Salesman Problem. A Brute Force Approach.

The travelling salesman problem asks the following question: “Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city and returns to the origin city?” In the following post, the cities are represented by coordinates on a Cartesian plane. The distance (Euclidean distance) […]