# WHILE Mini Project — Accumulator
# while True + break — keep adding until you say stop

# ─────────────────────────────────────────────
# Accumulator
# ─────────────────────────────────────────────

total = 0
count = 0

while True:
    entry = input("Enter a number (or 'stop'): ")
    if entry == "stop":
        break
    total += int(entry)
    count += 1

print(f"Numbers entered: {count}")
print(f"Total: {total}")

# ─────────────────────────────────────────────
# Test it
# ─────────────────────────────────────────────

# Enter a number (or 'stop'): 10
# Enter a number (or 'stop'): 25
# Enter a number (or 'stop'): 8
# Enter a number (or 'stop'): stop
# Numbers entered: 3
# Total: 43

# ─────────────────────────────────────────────
# Go further
# ─────────────────────────────────────────────

# Print the average — total / count
# watch out for division by zero if count is 0

# Add input validation
# what happens if the user types a word instead of a number?

# Track the highest number entered
# use a second variable updated inside the loop
