Start with the Ask block's They type setting. Choose A whole number for an age, A number for a price, or Words for a name. Anything that doesn't fit is asked again, before your program sees it.
For your own rules, like an age from 1 to 120 or a yes-or-no answer, check it with blocks: Repeat While the answer is wrong, Tell them what to type, then Ask again. The Check the Age example does exactly this.
Open it in the editor and run it, then change it and see what happens.
nn < 1 || n > 10Repeat →
"That is not from 1 to 10. Try again."nback to the top for the next lap
"You picked " + n4It showsYou picked 41207It showsThat is not from 1 to 10. Try again.That is not from 1 to 10. Try again.You picked 7n = int(input("Pick a number from 1 to 10 "))while n < 1 or n > 10: print("That is not from 1 to 10. Try again.") n = int(input("Pick a number from 1 to 10 "))print("You picked " + str(n))