我正在运行python并且有一个小脚本,它一直告诉我我有语法错误:
points = []
for s in range(0,background_width):
points.append(s)
power = math.pow(2, math.ceil(math.log(width)/ (math.log(2)))
***points***[0] = (height/2 + (math.random()*displace*2)- displace)
points[power] = (height/2 + (math.random()*displace*2)- displace)
displace *= roughness
然而我不知道它有什么问题[0] ??? 任何帮助都会很好
答案 0 :(得分:1)
power = math.pow(2, math.ceil(math.log(width)/ (math.log(2) ) )
^ ^ ^ ^ ^ ^ ^ ^ ^
1 2 3 3 4 5 5 4 2
关闭1缺少