Commit 97c9e0c6 by BellCodeEditor

auto save

parent 05e7d622
dect={}
def new_input():
global dect
while True:
t=input("请输录编号")
if t in dect:
print("再次输录编号")
continue
if t =="q":
print("退出程序")
break
if t =="ok":
print("输录完成")
print("输路结果为",dect)
break
e=int(input("请输录得分"))
dect[t]=e
print(dect)
def sum_input():
global dect
w=0
for v in dect.values():
l=v
w+=l
print(w)
\ No newline at end of file
import dhha
c=dhha.new_input()
j=dhha.sum_input()
\ No newline at end of file
import random
ls=[random.randint(1,10),random.randint(1,10),random.randint(1,10),random.randint(1,10)]
sum=0
for i in ls:
sum=sum+i
print(sum)
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