當我運行下面的代碼時,我總是收到一個語法錯誤,它突出顯示在哪裏顯示。
sf_population, sf_area = 864816, 231.89
rio_population, rio_area = 6453682, 486.5
sf_area = (int(sf_area))
rio_area = (int(rio_area))
def x= sf_population/sf_area
def y= rio_population/rio_area
if x<y:
print"True"
if x>y:
print"False"
這不是'def'作品。 – user2357112
確定的事情:'def x = stuff'是一個語法錯誤。 – ForceBru
無論如何,你甚至爲什麼還要把'def'放在那裏? – user2357112