Commit 4af7ac4d by BellCodeEditor

save project

parent 40c98e48
Showing with 43 additions and 34 deletions
import turtle as a
a.penup()
a.goto(0,-150)
a.pendown()
a.pensize(2)
a.setheading(90)
a.color("brown")
a.forward(300)
a.pensize(1)
a.color('black','red')
a.begin_fill()
for i in range(10):
a.left(45)
a.circle(80,60)
a.left(120)
a.circle(80,60)
a.end_fill()
for i in range(2):
a.penup()
a.goto(0,10-50*i)
x=20+80*i
a.setheading(x)
a.pendown()
a.color('brown','green')
a.begin_fill()
a.circle(60,60)
a.left(120)
a.circle(60,60)
a.end_fill()
a.hideturtle()
a.done()
class Hero:
def_init_(self,name,hp.attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+4
yase = Hero('后羿',240,23)
houyi.upgrade()
print("等级为:",houyi.level)
print("血量为:",houyi.hp)
print("攻击力为:",houyi.attack)
if enemy.hp>0:
info3=evemy.name+"还剩下"+str(enemy.hp)+"血量"
info=info1+info2+info3
print(info)
\ No newline at end of file
from turtle import *
penup()
goto(0,0)
pendown()
pensize(5)
pencolor("red")
fillcolor("yellow")
begin_fill()
for i in range(5):
fd(100)
right(144)
end_fill()
done()
\ No newline at end of file
player = input("请输入(石头/剪刀/布):")
print("玩家出拳:"+player)
\ No newline at end of file
player=input("玩家请出拳(石头/剪刀/布)")
print("玩家出拳:"+player)
import random
list=["石头","剪刀","布"]
computer=random.choice(list)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment