def Validation(digits):
while not digits.isdigit():
digits = input("Please select an interger for this part")
digits = int(digits)
length_1 = input("What is the length of one of the sides?")
Validation(length_1)
length_2 = input("What is the length of another side?")
Validation(length_2)
answer = length_1 * length_2 / 2
I am attempting to use a function which validates the users inputs. At the end it should turn it into an interger so that they can be multiplied together. However, I get the error: answer = length_1 * length_2 / 2 TypeError: can't multiply sequence by non-int of type 'str'. I can fix it by adding int(length_1) and int(length_2), however the point of the function was to not do this