Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 62)
62.
How can you read a list of numbers from the console and find their average?
average_numbers(input("Enter numbers separated by spaces: "))
numbers = input("Enter numbers separated by spaces: "); print(sum(map(int, numbers.split())) / len(numbers))
avg = calculate_average(input())
print(avg_numbers(get_numbers()))
Answer: Option
Explanation:
To read a list of numbers from the console and find their average, use numbers = input("Enter numbers separated by spaces: "); print(sum(map(int, numbers.split())) / len(numbers)).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.