0
這是我爲即將到來的AS計算初始代碼編輯的代碼。 這是作業,我堅持爲什麼它不起作用。有什麼建議麼?由於數據驗證 - Python 2.7
def GetKeyForCaesarCipher():
while True:
key = int(raw_input('Enter the amount that shifts the plaintext alphabet to the ciphertext alphabet: '))
try:
i = int(key)
break
except ValueError:
print 'please enter an interger'
return (key)
你是什麼意思的「不工作」? – 2013-03-07 15:30:57
如果OP已經明確了症狀,他會發現實際的問題。 – Malvolio 2013-03-07 15:49:10
你爲什麼問兩次? http://stackoverflow.com/questions/15275360/python-2-7-data-validation還是那個朋友? – 2013-03-07 15:49:34