Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

bellcode / lesson6-5-1

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit c18f0d6f authored 3 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 00f88887
Hide whitespace changes
Inline Side-by-side
Showing with 10 additions and 13 deletions
  • diy.py
diy.py
View file @ c18f0d6f
# 臂力挑战赛 学生=['wu','xiao','ba','bo']
# 快用你机灵的小脑瓜想想,如何将刘强和他的臂力值自动插入到hero列表中? 学生.pop(2)
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] print(学生)
name='input("你叫什么名字?")' 学生.insert(4,'nuo')
power='input("你的臂力值?")' print(学生)
# 自动排序 red=学生[:2]
for i in range(len(hero)): blue=学生[2:]
if i%2==1 and hero[i]>=power: print(red)
hero.insert(i-1,name) print(blue)
hero.insert(i,power) \ No newline at end of file
break
print(hero)
print(hero[6],hero[8],hero[10])
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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