已采納回答 / strong33
100*x+10*y+z是整數形式的三位數 在xyz為字符串時才能用,號,編譯出來是x y z? 這是我的理解,可能有錯- -。還有for z in range(0,10)應該改為for z in range(1,10)? ? 要跟x一樣,因為不可能是0y0的三位數 所以要從數字1~9,而中間的y是可以為0的
2018-10-14
已采納回答 / 白鹿cn
==>a(x^2 + (b/a)x + (c/a)) = 0==>x^2+(b/a)x + (b/2a)^2 = (b/2a)^2 - (c/a)==>(x+(b/2a))^2 = (b^2 - 4ac)/4a^2就是一個簡單配平方過程,一個正數的平方根有正負倆個
2018-10-14
已采納回答 / 大白的弟弟小白
import mathimport turtledef square(t, length):? ? """Draws a square with sides of the given length.? ? Returns the Turtle to the starting position and location.? ? """? ? for i in range(4):? ? ? ? t.fd(length)? ? ? ? t.lt(90)def polyline(t, n, length, ang...
2018-10-14
已采納回答 / 丹楓秋意
你的運算結果是錯的,這個相當于把1到100和100 比較了100 次,最后一次不通過所以最后x=100時跳出循環,執行sum+x=0+100=100,原因是你沒有在循環中加入循環體,只有循環結束條件和循環變量,所以sum的值一直都是0
2018-10-10