if x > 40 : print ("Please enter a number between 2 and 40")
41例如,如果用户输入,我不希望程序继续运行,但目前它确实如此。
素胚勾勒不出你
浏览 177回答 3
3回答
料青山看我应如是
import sysif (x > 40): print ("Invalid input received. Exiting now") sys.exit()else: # do the result of your program