Python:raw_input讀取數(shù)字的問題不幸的是raw_input沒有做我需要它做的事情。我想要做的是獲取totPrimes =我在提示符下鍵入的內(nèi)容。如果我while count < totPrimes用while count < 50這個腳本替換工作。如果我在提示符下鍵入50,這個腳本不起作用,我擔心raw_input不是我想要使用的函數(shù)嗎?這是我的代碼片段:testNum = 3div = 2count = 1totPrimes = raw_input("Please enter the primes: ")while count < totPrimes :
while div <= testNum :
添加回答
舉報
0/150
提交
取消