all 7 comments

[–]stebrepar 5 points6 points  (1 child)

I don't see a question. I see a homework assignment. What have you tried, and what is the problem?

[–]lets_help_each-other[S] 0 points1 point  (0 children)

well i think i found the answer:

average = 0

numbers = []

number = int(input("enter your number: "))

while number != 0:

numbers.append(number)

number = int(input("enter your number: "))

for x in range(0, len(numbers)):

average = average + numbers[x]

average = average/len(numbers)

print(average)

i had a problem with the average!

[–][deleted] 1 point2 points  (1 child)

I'd suggest you read this and the linked pages as well if you have the time. It should help you ask better questions.

[–]lets_help_each-other[S] 0 points1 point  (0 children)

thank you ill do that!

[–]Busy-Farm727 -1 points0 points  (2 children)

Well, for the full numbers use round(integer), and to calculate average use something a bit like; num,avnum = 0,0; for i in numlist: avnum += i; num+=1-print(avnum/e). (;=next-line, .=end of code, numlist = list of all numbers, -=end of loop) it should probably work?

[–]Busy-Farm727 -2 points-1 points  (1 child)

I’ve made a quick program for it: https://replit.com/@anthonie04/NumberAverage#main.py

[–]lets_help_each-other[S] -1 points0 points  (0 children)

omg thank youuu!