Files
notes/CS1032/practical-2023-11-15/sum.py
bluepython508 dc42625cf1 .
2024-01-22 10:56:12 +00:00

10 lines
185 B
Python

#! /usr/bin/env python3
sum = 0
while True:
i = input(f"[{sum:g}]: ")
if not i: break
try:
sum += float(i)
except ValueError: print(f"\t'{i}' is not a number")