猫史档案馆


【Python作品分享】函数计算血量【教程贴】

用户:牙赵牙赵查看:0 回复:1 评论:0 创建时间:2022-08-22T21:31:56


【作品展示】

center_image

 

【作品介绍】

买了编程猫的教程书就知道

 

【作品源代码】

import turtle

__Pen = turtle.Pen()


def hp_cal(hp, dps):

    real_hp = (hp - dps)
    return real_hp

player_hp = hp_cal(200, 120)
print(player_hp)
__Pen.speed(1)
__Pen.pensize(30)
turtle.bgcolor("#cc66cc")
__Pen.pencolor("#ffffff")
__Pen.fillcolor("#ffcc66")
__Pen.goto(123, 456)
__Pen.goto(456, 123)
__Pen.goto(109, 283)
__Pen.goto(405, 596)
__Pen.goto(123, 234)
__Pen.goto(11, 0)

__Pen

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
Mr.PythonMr.Python

熟悉的积木 熟悉的__Pen~

点赞0


评论