基于arcgis的python编程秘籍pdf

欢迎来到今天的讨论,我们将探讨,基于arcgis的python编程秘笈(第2版) 基于arcgis的python编程秘笈 下载,让我们开始吧!

这篇文章主要介绍了python的皮卡丘如何写代码,具有一定借鉴价值,需要的朋友可以参考下python小游戏实验报告。希望大家阅读完这篇文章后大有收获,下面让小编带着大家一起了解一下。

效果图

皮卡丘

实现的代码:

#!/usr/bin/env python

# -*- coding:utf-8 -*-

from turtle import *

'''

绘制皮卡丘头部

'''

def face(x,y):

"""画脸"""

begin_fill()

penup()

# 将海龟移动到指定的坐标

goto(x, y)

pendown()

# 设置海龟的方向

setheading(40)

circle(-150, 69)

fillcolor("#FBD624")

# 将海龟移动到指定的坐标

penup()

goto(53.14, 113.29)

pendown()

setheading(300)

circle(-150, 30)

setheading(295)

circle(-140, 20)

print(position())

forward(5)

setheading(260)

circle(-80, 70)

print(position())

penup()

goto(-74.43,-79.09)

pendown()

penup()

# 将海龟移动到指定的坐标

goto(-144,103)

pendown()

setheading(242)

circle(110, 35)

right(10)

forward(10)

setheading(250)

circle(80, 115)

print(position())

penup()

goto(-74.43,-79.09)

pendown()

setheading(10)

penup()

goto(-144, 103)

pendown()

penup()

goto(x, y)

pendown()

end_fill()

# 下巴

penup()

goto(-50, -82.09)

pendown()

pencolor("#DDA120")

fillcolor("#DDA120")

begin_fill()

setheading(-12)

circle(120, 25)

setheading(-145)

forward(30)

setheading(180)

circle(-20, 20)

setheading(143)

forward(30)

end_fill()

# penup()

# # 将海龟移动到指定的坐标

# goto(0, 0)

# pendown()

def eye():

"""画眼睛"""

# 左眼

color("black


原文地址1:https://blog.csdn.net/2401_83157073/article/details/136619949
参考资料:python中用turtle画一个圆形 https://blog.csdn.net/SXIAOYAN_/article/details/140061099

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值