我想這篇日誌基地2圖: if wave_type == "log":
emily.up()
emily.goto(0,1)
emily.down()
for x in range(100):
y = math.log(x)/math.log(2)
elaine.goto(x, y)
,但沒有奏效。請幫忙
當我運行這段代碼 import turtle
import time
def show_poly():
try:
win = turtle.Screen()
tess = turtle.Turtle()
n = int(input("How many sides do you want in your polygon?"))
angl
我是新來的蟒蛇與龜,並會感謝一些幫助。 我正在嘗試創建一個程序,該程序需要對多個邊進行輸入,然後用該邊的數量繪製正多邊形。但是,它可能會產生TimeLimitError,或者只是繪製一條直線。 以下是我有: sides = int(input("How many sides would you like? "))
angle = sides/360
import turtle
for co
我正在嘗試使用Turtle打印30個六角形,這些六角形是螺旋狀的,並且顏色從紅色變爲黑色。 爲了改變(r,b,g)中的設定值,我在乘以for循環i,所以在某些時候它會超過r = 255。我包括if聲明擁有它不會超過這一點,但它給我的錯誤: File "<ipython-input-4-35d45ac44fdd>", line 20
if r > '255'
^
Synta