Commit de101e86 by BellCodeEditor

auto save

parent 47e75038
Showing with 78 additions and 16 deletions
class Hero: import turtle
def __init__(self,name,hp,attar): pen=turtle.Pen()
self.level=1 pen.penup()
self.name=name pen.goto(0,-200)
self.hp=hp pen.pendown()
self.attar=attar pen.circle(200)
pen.penup()
def updent(self): pen.goto(-100,50)
self.level=self.level+1 pen.pendown()
self.hp=self.hp+40 pen.fillcolor("blue")
self.attar=self.attar+5 pen.begin_fill()
yase=Hero("亚瑟",300,10) pen.circle(20)
yase.updent() pen.end_fill()
print("等级是"+str(yase.level)) pen.penup()
print("血量"+str(yase.hp)) pen.goto(100,50)
print("攻击"+str(yase.attar)) pen.pendown()
pen.fillcolor("blue")
pen.begin_fill()
pen.circle(20)
pen.end_fill()
pen.penup()
pen.goto(0,50)
pen.pendown()
pen.circle(-50,steps=3)
pen.penup()
pen.goto(-150,-70)
pen.pendown()
pen.goto(0,-170)
pen.goto(150,-70)
turtle.done()
\ No newline at end of file
import turtle
import random
pen=turtle.Pen()
pen.penup()
pen.goto(0,-120)
pen.pendown()
pen.circle(120)
pen.penup()
pen.pendown()
def inn():
pen.goto(0,0)
pen.fillcolor("yellow")
pen.begin_fill()
pen.forward(120)
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()
for i in range(12):
inn()
pen.right(30)
turtle.done()
\ No newline at end of file
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
list1=[1,2,3,4,5,6]
list1.append(100)
list.insert(0,1000)
list1[3]=20
list.pop(2)
list[2:6]
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