Commit 73b879f6 by BellCodeEditor

save project

parent 2cb814c7
class Hero: import turtle
def __init__(self,name,hp,attack): import random
self.level=1 pen=turtle.Pen()
self.name=name pen.penup()
self.hp=hp pen.goto(0,-120)
self.attack=attack pen.pendown()
def updent(self): pen.circle(120)
yase.level=yase.level+1 pen.penup()
yase.hp=yase.hp+100 pen.pendown()
yase.attack=yase.attack+10 def io():
yase=Hero("亚瑟",300,200) pen.goto(0,0)
yase.updent() pen.forward(120)
print("等级:"+str(yase.level)) pen.fillcolor("yellow")
print("血量:"+str(yase.hp)) pen.begin_fill()
print("攻击:"+str(yase.attack)) pen.left(30)
pen.forward(80)
pen.right(60)
pen.forward(80)
pen.right(120)
pen.forward(80)
pen.right(60)
pen.forward(80)
pen.right(150)
pen.end_fill()
pen.goto(0,0)
for i in range(12):
io()
pen.right(30)
turtle.done()
\ No newline at end of file
m=input("请输入一个正整数")
n=input("请输入一个正整数")
s=""
for i in range(m,n+1):
if i%7==0 and i%5!=0:
s=s+str(i)+""
print(s)
m=int(input("请输入一个正整数"))
n=int(input("请输入一个正整数"))
s=""
c=n
if m>n:
n=m
m=c
for i in range(m,n+1):
if i%7==0 and i%5!=0:
s=s+str(i)+","
print(s[0:len(s)-1])
\ No newline at end of file
print("hello world")
\ No newline at end of file
import turtle
import random
pen=turtle.Pen()
def inn(size):
pen.fillcolor("yellow")
pen.begin_fill()
for i in range(5):
pen.forward(size)
pen.right(144)
pen.end_fill()
for i in range(5):
size=random.randint(10,150)
x=random.randint(-650,650)
y=random.randint(-450,450)
pen.penup
pen.goto(x,y)
pen.pendown()
inn(size)
pen.penup()
turtle.done()
\ No newline at end of file
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