Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save takahashilabo/53edde21f7327302efb7c5cc2ac265bc to your computer and use it in GitHub Desktop.
Save takahashilabo/53edde21f7327302efb7c5cc2ac265bc to your computer and use it in GitHub Desktop.
SE08
def calculate_average(num):
sum = 0
for num in nums:
sum += num
return sum / len(nums)
N = int(input())
numbers = []
for _ in range(N+1):
numbers.append(int(input()))
average = calculate_averag(numbers)
print("平均値: {average:.2f}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment