This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

19 lines
371 B
Python

list1 = []
while True:
try:
x = input("Enter a float value:")
if x=="0":
break
if str(x).count(".")!=1 or float(x)<0:
raise ValueError
except ValueError:
print("Give only positive float numbers")
else:
list1.append(float(x))
list1.sort()
for i in list1:
print(i)