最新回答 / 慕斯卡0574399
代碼運行時是按照順序來運行的。sum=0x=1while x<100:?? ? x=x+2? ? sum=sum+xprint sum首先運行第四行? ? 運行第五行的時候 x 此時的值是 3? ? sum=sum+x? ? x=x+2交換后 先運行 sum = sum+x? ? ?此時 x 值為 1
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
最新回答 / 茉莉_青花
我理解了過程,而邏輯是定死的,我們以三個為例子,為了完成第一輪,那么move(n-1, b, a, c)就必須是完成比一輪的B-->C,后面在執行,就要看move(n-1, b, a, c)是否能完成下一段的執行條件,如果不能就改位置,而這個剛好能完成。
2018-10-13