I have downloaded Python 3.8 and start to play around with those latest python functions. In this article, we will look at the Positional-only parameter […]
Python if else demo
A simple kata from codewars will show us how to use the if-else statement in python. The wide mouth frog is particularly interested in the […]
Sort list alphabetically with python
You will be given a vector of string(s). You must sort it alphabetically (case-sensitive!!) and then return the first value. The returned value must be […]
Summation of alphabet position with python
In this article, we will create a python function that will turn a string into a list, then return the sum of all the positions […]
Python array list’s count method
In this example, we will use the count method from the Python array list to decide which phrase to return from a function that will […]
Find the first non-consecutive number with Python
Your task is to find the first element of an array that is not consecutive. E.g. If we have an array [1,2,3,4,6,7,8] then 1 then […]
Find the position of the only odd number within a list with Python
In this example, we will write a python function that will return the position of the only odd number within the number list. If there […]
Find the maximum gap between the successive numbers in its sorted form from a Python list
Given a Python list consists of plus or minus numbers, we need to sort that list then find the maximum gap between the successive numbers […]
Turn string into the score
You are working at a lower league football stadium and you’ve been asked to automate the scoreboard. The referee will shout out the score, you […]
Capitalize the letters that occupy even indexes and odd indexes separately
Given a string, capitalize the letters within the string that occupy even indexes and odd indexes separately, and return as a list! Index 0 will […]