Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

make averages on python

# app.py

def averageOfList(num):
    sumOfNumbers = 0
    for t in num:
        sumOfNumbers = sumOfNumbers + t

    avg = sumOfNumbers / len(num)
    return avg


print("The average of List is", averageOfList([19, 21, 46, 11, 18]))
Comment

PREVIOUS NEXT
Code Example
Python :: merge two dict python 3 
Python :: python regex get all matches 
Python :: get string until character python 
Python :: how to hide a turtle in turtle python 
Python :: python cv2 get image shape 
Python :: python currency signs 
Python :: python get volume free space 
Python :: How to draw a rectangle in cv2 
Python :: create age-groups in pandas 
Python :: for loop in django 
Python :: python make sound when finished 
Python :: how to search a file in windows 10 using python 
Python :: python numpy array to list 
Python :: pandas dataframe delete column 
Python :: Scaling Operation in SkLearn 
Python :: pyspark join 
Python :: string hex to decimal python 
Python :: python continue 
Python :: qradiobutton example 
Python :: system to extract data from csv file in python 
Python :: python read pdf 
Python :: print index of tuple python 
Python :: python timestamp to datetime 
Python :: how to combine two arrays in python 
Python :: sqlite check if table exists 
Python :: python list comprehension elif 
Python :: or operator in django queryset 
Python :: python moving average pandas 
Python :: godot setget 
Python :: how to save a pickle file 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =