本文整理汇总了Python中turtle.Turtle.pencoleor方法的典型用法代码示例。如果您正苦于以下问题:Python Turtle.pencoleor方法的具体用法?Python Turtle.pencoleor怎么用?Python Turtle.pencoleor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类turtle.Turtle
的用法示例。
在下文中一共展示了Turtle.pencoleor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: random_color
# 需要导入模块: from turtle import Turtle [as 别名]
# 或者: from turtle.Turtle import pencoleor [as 别名]
from turtle import Turtle
from random import random
def random_color():
return(random(),random(),random())
le = Turtle()
name=input('What is your name')
lecoleor=input('What color do you want your name in? (For a random color, put "random_color()"')
lesize=input('How thick should the letters be? for a random thickness, put "random()"')
le.pencoleor(lecoleor)
le.pensize(lesize)
def a():
le.left()
le.forward()
le.right()
le.forward()
le.right(180)
le.forward()
le.left()
le.forward()
le.right(180)
le.forward()
le.right()
le.forward()
le.left()
def b():
le.left(90)
le.forward()
le.right(90)
le.forward()
#Curves??
#What follows it temporary