如何使用Turtle Python随机化形状和颜色?
有人可以使用Turtle Python帮助我,以随机颜色绘制随机形状?
Can someone please help me with drawing random shapes in random colors using turtle python?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先分享您的尝试。这是一个简单的程序,从列表中选择随机颜色和形状并绘制它。您可以在列表中添加更多颜色或更多功能来绘制不同的形状。
请随时在下面的评论中要求澄清...
Sharing your attempt first is appreciated. Here is a simple program that chooses a random colour and shape from a list and draws it. You can add more colours in the list or more functions to draw different shapes.
Feel free to ask for clarifications in the comments below...
这是一些非常简单的代码,用于随机移动和颜色:
Here is some very straight-forward code for random moves and colors: