I Haz Codes

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Menu
Another average day at the office…
You know the story. Your stuck at work and then your boss yells at you for not working out the average spend of customers for the last week. But fear not python will rush to your rescue with the ultimate in average coding wonder!  
spendArray = [3.12, 9.54, 8.11, 20.34, 16.71, 19.11]
count = 0
total = 0
while count < len(spendArray):
    ????????????
    count += 1
???????????

Replace the ???? with code to work out the average from the spendArray.



Leave a Reply

Your email address will not be published. Required fields are marked *

Information