Python: What function should I use?

Hello,

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?”))

Please include a link to the lesson/course and please format your code properly. You can use the “</>” button in the text window.

It’s a project of my own

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?”))

while will continue to execute as long as the expression is True. Perhaps a properly indented break statement is needed…?