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

auto save

parent 0db28b07
Hide whitespace changes
Inline Side-by-side
Showing with 61 additions and 3 deletions
  • __pycache__/k.cpython-37.pyc
  • diy.py
  • k.py
  • l.py
  • o.py
__pycache__/k.cpython-37.pyc 0 → 100644
View file @ 55dd6a1c
File added
This diff is collapsed. Click to expand it.
diy.py
View file @ 55dd6a1c
......@@ -6,6 +6,7 @@ hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
# 自动排序
for i in range(len(hero)):
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i-1,name)
hero.insert(i,power)
print(hero)
\ No newline at end of file
break
print(hero[-6: ])
This diff is collapsed. Click to expand it.
k.py 0 → 100644
View file @ 55dd6a1c
def new_input():
total=[]
while True:
data=input("请输入价格")
if data=="s":
break
else:
try:
data1=int(data)
except:
print("请输入数字")
else:
total.append(data1)
return total
result1=new_input()
#print(result1)
def count(list):
a=0
for i in list:
a=a+i
#print("价格总和是"+str(a))
return a
result2=count(result1)
print(result2)
This diff is collapsed. Click to expand it.
l.py 0 → 100644
View file @ 55dd6a1c
def new_input():
total=[]
while True:
data=input("请输入价格")
if data=="s":
break
else:
try:
data1=int(data)
except:
print("请输入数字")
else:
total.append(data1)
print(total)
return total
a=new_input()
print(a)
import turtle
This diff is collapsed. Click to expand it.
o.py 0 → 100644
View file @ 55dd6a1c
import k
h=k.new_input()
g=k.count(h)
print("成绩是"+str(g))
\ No newline at end of file
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