print("add float")

ns = input().split("#")[0].split(",")
f = []
di = []
print(ns)

print("add directly")
for i in range(len(ns)):
    f.append(float(ns[i]))
print(sum(f))
if max(f) >= 1:
    print("This program cant handle these numbers.\nThe numbers must be smaller than 1.")
else:
    print("check digit")
    for i in range(len(ns)):
        ns[i] = ns[i].split(".")[1]
        print(ns)
        di.append(len(ns[i]))
    times = max(di)
    print("max digit> "+str(times))
    for i in range(len(ns)):
        ns[i] = int(ns[i][ns[i].rfind("0")+1:])*10**(times-di[i])
        print(ns[i])
    res = sum(ns)
    print(res/10**times)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: