Answers for "average sum functions in python"

1

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]))
Posted by: Guest on April-14-2020
1

how to use a function to find the average in python

avreage_cost = cost
    avg = sum(avreage)/len(avreage) 
    print("The average amout you spent is ", round(avg,2))
Posted by: Guest on March-20-2020

Python Answers by Framework

Browse Popular Code Answers by Language