Commit afbc9be8 by BellCodeEditor

auto save

parent 0db28b07
Showing with 55 additions and 2 deletions
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
hero_name = []
hero_power = []
for i in range(len(hero)):
if i % 2 == 0:
hero_name.append(hero[i])
else:
hero_power.append(hero[i])
print(hero_name,hero_power)
name = input("输入名字:")
power = int(input("输入臂力值:"))
for i in range(len(hero_power)):
if hero_power[i] >= power:
hero_power.insert(i,power)
hero_name.insert(i,name)
print(hero_name,hero_power)
\ No newline at end of file
a = input()
a = int(a)
print(type(a))
l = a * 4
z = a * a
print("周长",l)
print("面积",z)
\ No newline at end of file
import turtle
turtle.setup(600,500,600,300)
turtle.pensize(20)
turtle.penup()
turtle.goto(-50,100)
turtle.pendown()
turtle.pencolor("red")
turtle.forward(200)
turtle.right(135)
turtle.pencolor("green")
turtle.forward(280)
turtle.left(135)
turtle.pencolor("blue")
turtle.forward(200)
turtle.penup()
turtle.hideturtle()
turtle.done()
\ No newline at end of file
print(5* 'A')
\ No newline at end of file
......@@ -8,4 +8,10 @@ for i in range(len(hero)):
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
print(hero)
\ No newline at end of file
print(hero)
# name = input("输入名字:")
# power = input("输入臂力值")
end = len(hero)
start = end - 6
print(hero[start:])
\ 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