ASCII Progress Bar

I think my code is properly ok, but it’s showing runtine error everytime


usr = float(input()).__floor__()
# print(usr)
if 0 <= usr <= 100:
    if usr < 10:
        print("[", "."*10, "]", sep="", end=" ")

    elif 10 < usr < 20:
        print("[+", "." *9, "]", sep="", end=" ")

    elif 20 < usr < 30:
        print("[++", "." *8, "]", sep="", end=" ")

    elif 30 < usr < 40:
        print("[+++", "." *7, "]", sep="", end=" ")

    elif 40 < usr < 50:
        print("[++++", "." *6, "]", sep="", end=" ")

    elif 50 < usr < 60:
        print("[+++++", "." * 5, "]", sep="", end=" ")

    elif 60 < usr < 70:
        print("[++++++", "." * 4, "]", sep="", end=" ")

    elif 70 < usr < 80:
        print("[+++++++", "." * 3, "]", sep="", end=" ")

    elif 80 < usr < 90:
        print("[++++++++", "." * 2, "]", sep="", end=" ")

    elif 90 < usr < 100:
        print("[+++++++++", "." * 1, "]", sep="", end=" ")

    elif usr == 100:
        print("[++++++++++", "." * 0, "]", sep="", end=" ")

    print(usr,"%", sep="")

else:
    exit()

@hjr265

# Coded by SpiderX

usr = int(float(input()))
# print(usr)
if 0 <= usr <= 100:
    print("[", "+" * (usr // 10), "." * (10 - (usr // 10)), "]", sep="", end=" ")
    print(round(usr), "%", sep="")

This Worked Finally :slight_smile: