scores = {
'Math': 95,
'Physics': 80,
'Chemistry': 86,
'Geometry': 98,
'Algebra': 93
}
total = 0
for value in scores.values():
total += value
average = total / len(scores)
print(average)
سوال ۲۰
.........
temperatures = [
72.38, 72.83, 73.12, 73.61, 72.97,
73.74, 73.00, 72.56, 73.43, 72.11,
73.98, 72.04, 72.64, 73.35, 73.89,
72.20, 73.50, 72.41, 73.29, 72.78
]
high = []
low = []
for t in temperatures:
if t > 73.5:
high.append(t)
else:
low.append(t)
avg_high = sum(high) / len(high)
avg_low = sum(low) / len(low)
result = abs(avg_high - avg_low)
print(result)
سوال ۱۹