Very new to Python and need help to figure out how to write a code that asks customer for input that has to be between 1-10 days. If what’s entered is outside that range it asks them again to input valid amount - once done it will move onto next question. The valid input should be stored within the variable for use later. Currently only have the below written:
Num_of_days = int(input("How long are you hiring the car for? (Max 10 days)\n "))
while Num_of_days > 10:
print(input(“Number of days exceeds the allowance. Maximum of 10 days allowed. How long are you hiring the car for?”))
Num_of_days = int(input("How long are you hiring the car for? (Max 10 days)\n "))
while Num_of_days > 10:
print(input(“Number of days exceeds the allowance. Maximum of 10 days allowed. How long are you hiring the car for?”))