Commit 18d4c9b3 by BellCodeEditor

save project

parent 26fdebc3
Showing with 27 additions and 20 deletions
b=['袁术','公孙瓒','关羽','张飞','刘备','曹操']
b.pop(3)
b.pop(-2)
b.remove('曹操')
print(b)
#添加
b=['袁术','公孙瓒','关羽']
b.append('曹操')
b.insert(2,'张飞')
print(b)
#列表添加
a=['吕布','董卓']
b=['关羽','张飞','刘备']
c=['曹操','袁术','诸葛亮','公孙瓒','颜良','文丑']
a.extend(b)
a.extend(c[1:5])
print(a)``
\ No newline at end of file
import turtle
#背景
screen=turtie.Screen()
screen.bgcolor("red")
#写字
pen=turtle.Pen()
pen.penup()
pen.goto(100,-100)
pen.write("你好~\n乡巴佬国王",font=("times",0,"normal"))
pen.hideturtle()
#画爱心
pen1=turtle.Pen()
pen1.pencolor("green")
pen1.pensize(5)
a=screen.textinput("提示","你需要多大的爱心")
lovesize=int(a)
pen1.left(45)
pen1.forward(2*lovesize)
pen1.circle(lovesize,180)
pen1.right(90)
pen1.circle(lovesize,180)
pen1.forward(2*lovesize)
pen.hideturtle()
turtle.done()
\ No newline at end of file
......@@ -6,4 +6,4 @@ for i in range(len(c)):
c.insert(i-1,name)
c.insert(i,power)
break
print(c[-5:])
\ No newline at end of file
print(c[-5:])
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