In this code example we show you how to use a dictionary to create a simple quiz, then you can loop through the questions and try and answer them This …
code
-
In this code example we create a morse code converter in python What is Morse Code Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, …
-
Quicksort is an in-place sorting algorithm it is still a commonly used algorithm for sorting. When implemented well, it can be somewhat faster than merge sort and about two or three times faster than heapsort. Quicksort …
-
A bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in …
-
A heterogram is a word, phrase, or sentence in which no letter of the alphabet occurs more than once. The terms isogram and nonpattern word have also been used to …
-
In this code snippet we show you how easy it is to make a password generator using python. Here are a couple of rules You should try to make sure …
-
Body mass index (BMI) is a value derived from the mass (weight) and height of a person. The BMI is defined as the body mass divided by the square of …
A selection sort is an in-place comparison sorting algorithm. It has an O(n2) time complexity, which makes it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its …
In this code example we will create a simple clock. There will be a console based example and a simple gui version as well. We will use the datetime module …