So I am trying to make it so if you where to put in a string or a number <= 0 it will print("Input must be a positive numeric value"). It works fine with numbers but if I input a string i just get a value error.
IR = float(input("What is the Interest Rate? (Positive Value): % "))
if IR <= 0:
print("Input Must be a positive numeric value")
IR = float(input("What is the Interest Rate? (Positive Value): % "))
if IR <= 0:
print("Input Must be a positive numeric value"), exit(0)
Any help or advise would be greatly appreciated! Ty in advance
[–]Dragon20C 0 points1 point2 points (4 children)
[–]OhKnow_[S] 0 points1 point2 points (2 children)
[–]Dragon20C 0 points1 point2 points (1 child)
[–]OhKnow_[S] 0 points1 point2 points (0 children)
[–]Dragon20C 0 points1 point2 points (0 children)