Python Tutorial 24 : Descriptive statistics in Python

Python support following Descriptive statistics  function Averages and measures of the central location mean() Arithmetic mean (“average”) of data. harmonic_mean() Harmonic mean of data. median() Median (middle value) of data. median_low() Low median of data. median_high() High median of data. median_grouped() Median, or 50th percentile, of grouped data. mode() Mode (most common value) of discrete data. … Read more

Python Tutorial 22 : How to return a value from a function

As mentioned previously, the “Def” statement defines a function. So how to return a value from a function?   We can use the return statement to return a value from a function. For example: [vtftable cols=”{0}0:fff2cc;{/}”] def dummyfunction (i):{;n}    return i;nn; [/vtftable] In other languages, you may have to define the datatype of the … Read more

Python Tutorial A01: How to add python application to Windows Path system Variable?

How to add python application to Windows Path system Variable?   Following is the steps to add the Python application to the Windows Path System Variable.   Your Python application should be installed in a folder called “Anaconda3” under your user profile. For example my path is C:\Users\XXX\Anaconda3   Go to “System” in Control Panel … Read more

Python Tutorial 16: What is Data Dictionary In Python?

In previous tutorial – Python Tutorial 11: Data Type in Python – I have illustrated the following Non-Primitive Data Structure list Set Tuple Data Dictionary What is Data Dictionary In Python? Data Dictionary in python is very similar to list that allows multiple items to be stored in the same data set. However, it have very different … Read more

Python Tutorial 13: How to create multi-dimension array in Python?

If you are have some programming experience, you may have come across with a term “Array”. Array is simply a list that allows multiple values where sharing the same domain and data type stored together. An array can be multi-dimensional as well.  However, in some language like VBA, the size of array need to be … Read more

Python Tutorial 09: Looping in Python

Python support following type of loops: “While” Loop For Loop While Loop Syntax : While <Condition True> Example [vtftable ] def CountDown():{;n}     i = 10 {;n}     while i>=0: {;n}          print(i, end= ‘ ‘) {;n}          i = i – 1 {;n}    print() {;n}    print (‘Done!’, end= ‘ ‘);;;Function Name{;n}Initial … Read more

Python Tutorial 08 : “=” Vs “==” in Python

From the last example of my previous blog – Python Tutorial 07: Comparison using the If statement in Python , you my aware that I have used an operator “==” in the condition statement. What is  “=” Vs “==” in Python? The answer is simple! The “=” operator is for assignment. Assigning a value into a variable. … Read more