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

Guessing game. Part II – Monte Carlo Simulation

We’ve created a simple game in the previous post (see Guessing Game) where the positions of ‘O’ and ‘X’ are shuffled randomly, and the player gets a point for making a correct guess. Let’s consider the scenario where someone wanted to monetise this game. Some of the considerations might be as follows:– how much should […]

Guessing game.

Let’s create a guessing game with a list of five objects containing three ‘O’ and two ‘X’ which would be shuffled randomly. The player would then be asked to choose a position (Left to right – numbered 1 to 5) that do NOT contain an ‘X’. This is equivalent to a probability of 0.6 of […]

Something for amino acid sequences. Part II.

In the previous post, we had a programme that can identify the position and occurrence of a single amino acid (represented by a letter) within a given sequence (represented by a string of letters). Let’s modify the code to enable us to search for a block consisting of multiple amino acids within the sequence provided. […]