Sorry, I am still a beginner in Python and am unsure how to exit a loop. Firstly I am having trouble with the "q to quit" input. I've messed around with it and can't get the program to exit using q or Q.
full_name = input ('Enter a customers name (or q to quit): ')
address = input ("Enter the customer's address: ")
location = input("Enter customer's city, state, and zip code: " )
cancel = 'q'
while cancel == 'q' or cancel == 'Q':
print ()
thin_M = 'Thin Mints'
thin_M = int(input('Enter the number of Thin Mints: '))
while thin_M > 10:
print ('Sorry we are accepting a maximum of 10 boxes per type.')
Secondly, once I reach the while portion I find that if the number entered is over 10 my print statement will just continue to loop over and over again. What should I do to make sure the last print statement does not loop? The program should re-prompt and issue the sorry message. I am not sure if the top is also considered a loop but how would I get q or Q to work with to exit this code as well?