-5
내 프로그램에서 사용자에게 프로그램을 다시 사용할지 묻습니다 (다시 시작). 파이썬 3.3에서 어떻게 할 수 있습니까? 어떻게 파이썬 3.3에서 루프를 만들 수 있습니까?
나는 그것은 당신이 파이썬에 존재하지 않는do...while
같은 것을 찾고있는 것 같습니다이
loop=1
while(loop==1):
#code
loop-=1
done=0
while(done==0):
choice=input("Do you want to restart?(Y/N)")
choice1=choice.upper()
if(choice1=="Y"):
loop+=1
done=1
print("Restarting...")
elif(choice1=="N"):
done=1
print("The program will now END. Thank you for using the program.")
GIYF http://docs.python.org/ 3/reference/compound_stmts.html # (http://docs.python.org/3/reference/compound_stmts.html#while – Sinkingpoint
) 무엇이 문제입니까? – slfan