py123第一次作业
绘制五角星<br>import turtle turtle.setup(600,350,200,200) turtle.pensize(2) turtle.pencolor("black") turtle.fillcolor("red") turtle.begin_fill() for i in range(5): turtle.forward(200) turtle.right(144) turtle.end_fill()
1 value = eval(input()) 2 3 list= [] 4 for i in range(6): 5 num = value ** i 6 list.append(str(num)) 7 8 print(" ".join(tuple(list)))
value = eval(input()) list= [] for i in range(6): num = value ** i list.append(str(num)) print(" ".join(tuple(list)))
Co
#绘制五角星<br> import turtle turtle.setup(600,350,200,200) turtle.pensize(2) turtle.pencolor("black") turtle.fillcolor("red") turtle.begin_fill() for i in range(5): turtle.forward(200) turtle.right(144) turtle.end_fill()
de
from turtle import * width(5) pencolor("green") fillcolor("violet") begin_fill() while True: forward(100) right(-60) forward(100) right(120) if abs(pos()) < 1: break end_fill() forward(100) right(0) pencolor("purple") forward(100) right(60) forward(100) right(60) forward(100) right(60) forward(100) right(60) forward(100) right(60) forward(100) right(60)
import turtle as t t.setup(600, 600, None,None) t.pu() t.fd(-120) t.pensize(5) t.width(5) t.pencolor("darkgreen") t.pd() t.fd(250) t.seth(120) t.pencolor("black") t.fd(250) t.seth(-120) t.pencolor("blue") t.fd(250) t.pencolor("purple") t.fd(250) t.seth(0) t.pencolor("green") t.fd(250) t.pencolor("gold") t.fd(250) t.seth(120) t.pencolor("yellow") t.fd(250) t.seth(-120) t.pencolor("grey") t.fd(250) t.seth(120) t.pencolor("pink") t.fd(250)
努力地向月光下的影子——骇客靠拢!!!
黎明之花,待时绽放