Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def skip():
- print ("_" * 60)
- print ("_" * 60)
- skip()
- # Завдання 11
- numbers = [206.8, -31.18, 0, 36.9, -313.8, 0.67, -230.2, 0, 21.18, 5.64, 115.36, -270.3, 18.8, 35.7, 6.4]
- target_numbers = []
- for num in numbers:
- if num > -273 and num < 20:
- target_numbers.append(num)
- length = len(target_numbers)
- print("Кількість елементів –", length)
- numbers_sum = sum(target_numbers)
- average = numbers_sum / length
- print("Середнє арифметичне елементів –", format(average, '.3f'))
- skip()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement