Created
May 29, 2024 03:08
-
-
Save takahashilabo/53edde21f7327302efb7c5cc2ac265bc to your computer and use it in GitHub Desktop.
SE08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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