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

bellcode / lesson6-5-2

  • 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 94e32de5 authored 4 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 80a6cee7
Hide whitespace changes
Inline Side-by-side
Showing with 6 additions and 5 deletions
  • diy.py
diy.py
View file @ 94e32de5
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
# 问询处 # 问询处
a=input("请输入一个姓名:") a=input("请输入一个姓名:")
b=input("请输入臂力:") b=int(input("请输入臂力:"))
# 归档处 # 归档处
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100] hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100]
for i in range(len(hero)): for i in range(len(hero)):
win=(8[]) if i%2==1 and hero[i]>=b:
win=[] hero.insert(i-1,a)
win.insert(0,a) hero.insert(i,b)
win.insert(0,b) break
print(hero[-6:])
# 打印出臂力最强的三个人和他们对应的臂力值: # 打印出臂力最强的三个人和他们对应的臂力值:
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