In this article we show how to count a vowel or consonant in python We will also show you a commonly found piece of code that does this incorrectly, I’ve …
-
-
In this code example we show how to read a file word by word and display the contents The process is as follows Open a file in read mode which …
-
In this article we show 2 ways to find the largest value in a numpy array Example 1 In this example we use the numpy max function that returns the …
-
In this article we will look at how to copy a numpy array to another array Lets look at some examples Example 1 First of all lets use the equals …
-
The Numpy module has its own add, subtract, multiply, divide, mod, and remainder functions to perform arithmetic operations on a Numpy Array. Lets look at an example of this first …
-
In this article we look at whether a number is odd or even. There is a fairly simple formula to work this out – If you divide a number by …
-
In this article we show you how to convert a decimal number into binary, octal, and hexadecimal numbers. Here are a brief description of the common systems Decimal System: This …
-
In this article we will show you how to create a program in python to check if a year is a leap year. First of all lets see a definition …
-
In this article we will look at how to check if a number is a prime number using python. This is a fairly common basic programming exercise in many languages. …
-
The following is a very simple app that is built using PyGame Installing: The command is the following, the preferred method is using pip as per below pip install pygame …