Commit 5835fa15 by BellCodeEditor

auto save

parent db00c0cf
Showing with 18 additions and 21 deletions
import turtle
pen=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("yellow")
pen.penup()
pen.goto(100,-100)
pen.write("hellow,洛伊。\n我很喜欢",font=("Times",15,"normal"))# 利用write()帮助悟空给诺依回信吧~
pen.hideturtle()
penl=turtle.Pen()
penl.pensize(5)
penl.pencolor("red")
len=60
penl.left(45)
penl.forward(len)
penl.circle(len/2,180)
penl.right(90)
penl.circle(len/2,180)
penl.forward(len)
penl.hideturtle()
turtle.done()
\ No newline at end of file
class Hero:
def combat(self,enemy):
enemy.hp=self.attack
imfo1=self.name+"对"+enemy.name+"发起进攻."
imfo2="造成"+str(self.attack)+"点伤害."
imfo3=enemy.name+"还剩下"+str(enemy.hp)+"血量"
imfo=imfo1+imfo2+imfo3
print(imfo)
import
data=[95,92,94]
with open("scores.csv","w") as csvfile:
writer=csv.writer(csvfile)
writer.writerow(data)
\ No newline at end of file
95,92,94
3
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