valid_marks = [str(n) for n in range(101)]
price = None
while price is None:
    price = input('Please enter your marks for Maths:')
if not price in valid_marks:
    price = None
print('Please enter a whole number from 0 to 100')
Циклы в Python