例如,當我進入2 * 100
,我得到: 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
當我要求Python將數字乘以100時,它會打印數字100次?
這是爲什麼? 這裏是我的代碼
import math
KeepProgramRunning = True
while KeepProgramRunning:
print 'Please enter the centimetre value you wish to convert to millimetres '
a = raw_input()
print 'The answer is',
我什麼也看不到有需要的'math'模塊 – tMC
我知道,變量名是主觀的,但KeepProgramRunning簡直是可怕..只是使用在運行: – Ant