Commit fc604845 by BellCodeEditor

auto save

parent 3ce31792
Showing with 55 additions and 21 deletions
a=[12,23,56,25,9]
b=len(a)
for j in range(b-1):
for i in range(0,b-j-1):
if a[i]>a[i+1]:
n=a[i]
a[i]=a[i+1]
a[i+1]=n
print(a)
a=[12,23,56,25,9]
b=len(a)
j=0
while j<b-1:
i=0
while i<b-j-1:
if a[i]>a[i+1]:
n=a[i]
a[i]=a[i+1]
a[i+1]=n
i=i+1
j=j+1
print(a)
\ No newline at end of file
a=[12,23,56,25,9]
b=len(a)
j=0
for i in range(1,b-1):
index=i
if a[i]<a[index]:
index=i
print(a)
\ No newline at end of file
scores=[93,91,61,85,79,94,92,74,86,83,97,89,65,
94,85,100,99,78,71,99,77,93,68,88,76,71,76,76,74,
60,90,69,72,90,78,96,83,80,72,82,71,88,80,99,78,95,
65,68,83,91,99,88,78]
for i in range(len(scores)):
print(scores)
\ No newline at end of file
list=list(input(":"))
for i in list:
if "a"in list:
list.remove("a")
print(list)
\ No newline at end of file
""" a=[1,2,3,89,100,32,55]
使用turtle模块画图 c=max(a)
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果 b=min(a)
""" print("最大值是:",c)
import turtle print("最小值是:",b)
\ No newline at end of file
pen = turtle.Pen()
screen = turtle.Screen()
screen.bgcolor("light pink")
colors=["white","blue","violet","cyan"]
# 请创造师在下面接着创作
distance=1
pen.speed(1000)
for i in range(1,300):
pen.pencolor(colors[i%4])
pen.forward(i)
pen.right(91)
# 隐藏画笔,保存画布
pen.hideturtle()
turtle.done()
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