# pede pelo nome do aluno, ou termina o programa, se "fim".
while(True):
aluno = input("\nInsira o nome do aluno: ")
while(aluno == "" or aluno == None):
aluno = input("Por favor insira o nome do aluno: ")
if (aluno == "Fim" or aluno == "fim"):
print(bold + "Fechando o programa...\n" + bold_end)
sys.exit()
if (aluno.istitle() != True):
qst = input("\nEste não parece ser um nome regular. Tem certeza que deseja prosseguir?")
if (qst == 'N' or qst == 'No' or qst== 'Não' or qst == "n" ):
continue
This is a little snippet of a program I've made to help me correcting the tests of my students. He does exactly what I want, but the last four lines that I've exposed work, and I don't know why.
If a name that is not composed not only of uppercase and lowercase letters is inserted, the program must question if I want to proceed with that name. If I type "N" or anything of the like, the program restarts, and asks me again for the name of the student. If I type in any other thing, the program proceeds as it should. The question is: why?