I finished a schoolproject, I made a calculator that calculates how high the chair and table should be to suit you after you tell it how tall you are, so it only takes numbers, but if someone types "165cm" and not just "165", it crashes. Is there a way to make python ignore the letters in that input? Or at least say something like "Sorry, only numbers are allowed" And let the user type their height again. I prefer if you write the whole final code first and then explain how it works but just one of them might work too. It's in swedish but I don't think its a problem. If you have to use längd and you don't know how to write ä you can just type a, I can fix it later. Heres the code
längd = int(input())
bord = längd*0.3883063508
stol = längd*0.2582726288
print("Bordet ska vara ", end=""),
print(round(bord), end=""),
print(" cm hög och stolen ska vara ", end=""),
print(round(stol), end=""),
print(" cm hög.", end=""),```