引入等边三角形投影
import turtle
turtle.pensize(5)
turtle.pencolor('red')
turtle.pendown()
turtle.fd(200)
for i in range(2):
turtle.left(120)
turtle.fd(200)
turtle.penup()
turtle.left(180)
turtle.fd(100)
turtle.pendown()
turtle.right(60)
turtle.fd(100)
for i in range(2):
turtle.right(120)
turtle.fd(100)
turtle.done
六角形的投射
import turtle
turtle.pensize(1)
turtle.pencolor('red')
turtle.pendown()
turtle.left(30)
turtle.forward(200)
for i in range(2):
turtle.right(120)
turtle.forward(200)
turtle.penup()
turtle.right(150)
turtle.forward(200)
turtle.pendown()
turtle.left(150)
turtle.fd(200)
for i in range(2):
turtle.left(120)
turtle.fd(200)
turtle.done()
五角星描绘
import turtle as t
t.pencolor('red')
for i in range(5):
t.forward(100)
t.right(144)
说句心里话
name=input("") heartword=input("") str1=name+',我想对你说,'+heartword print(str1)
N的多次方
n=eval(input())
for i in range(5):
print(pow(n,i),end=" ")
print(pow(n,5))
世界,你好!
print('hello world')
M与N的数学运算
m=eval(input())
n=eval(input())
a=m+n
b=m*n
c=m**n
d=m%n
e=max(m,n)
print(a,b,c,d,e)
你好,世界
print("你好,某某某同学")