I am working on some homework and am at a standstill. The question is as follows:
Create a program that asks the user to enter a series of positive numbers. The program should store the positive numbers in a list. When the user enters a negative number, the program should stop asking the user to enter numbers. The program should display the following data:
The lowest number in the list.
The highest number in the list.
The average of the numbers in the list.
I have started my code and am able to create the list, but I am stumped on how to display the highest and lowest numbers as well as the average. Any help would be appreciated.
number = 1
numbers = []
while ( number > 0):
number = int(input("Please enter a positive number (Negative to stop: "))
if number > 0 :
numbers.append(number)
print (numbers)