سرگرمی و طنز ورزشی کارتون و انیمیشن علم و فن آوری خودرو و وسایل نقلیه آموزش موسیقی و هنر اخبار و سیاست حیوانات و طبیعت بازی حوادث مذهبی
۱۴۰۵/۰۳/۱۶
Calculating the Average Exercise

Construct an application that calculates the average of the first 10 items - starting with 1. So [1,2,3,4,5,6,7,8,9,10] these are the numbers you have to consider - with loops of course :)

Good luck

================================================================
Calculating the Average Solution

item_counter = 0
sum = 0

for item in range(1, 11):
sum += item
item_counter += 1

print('Average of the first 10 items (starting with 1) is: ' + str(sum/item_counter))