Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ages = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
- count = 0
- total = 0
- for i in ages:
- if 30 <= i <= 40:
- count += 1
- total += i
- medium_age = total // count
- print("Средний возраст:", medium_age)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement