企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` from turtle import * from math import * right(90) n=cos(radians(heading()-45))/4+0.5 pencolor(n,n*0.8,n*0.8) ``` ``` from math import * n =cos(radians(90-45)) #n = cos(45) print(n) ``` ``` import turtle from math import cos,radians a = turtle.heading() print(a) turtle.speed(1) #turtle.mode('logo') turtle.mode('world') #turtle.setworldcoordinates(-500,-500,500,500) #turtle.setworldcoordinates(-50,-7.5,50,7.5) for i in range(4): turtle.left(100) print(turtle.heading()) #print(val) #if val >0 : n=cos(radians()) print(n) turtle.write(str(val)) turtle.backward(100) turtle.left(90) ```