Commit 678622e7 by BellCodeEditor

save project

parent dbcbc419
# 假期到了,诺依想出去玩,但不知道有没有飞机直达那里, import quiz
# 悟空做了个小程序帮助诺依,然而代码出现了3处错误。 data = quiz.new_input()
# 请你找出来,并运行~ score = quiz.sum(data)
city = ['纽约','华盛顿','桃源岛','洛杉矶','芝加哥','旧金山'] print('分数'+str(score))
r=input('你想去哪里啊?') \ No newline at end of file
if raise in city:
print('可以乘坐飞机通往'+r)
else:
print('没有'+r+'这座城市')
\ No newline at end of file
# 下面的这段代码一共有5处错误,每一行都有一种典型的语法错误,请修改~ def new_input():
#for i in range(1,8) total = []
#print('克洛诺斯将第' + str(i) + '个孩子吞进肚子里') while True:
#if i = 5: unit= input('请输入(q退出)')
#break if unit=='q':
#print('第6个孩子宙斯逃过一劫。) break
else:
try:
unit = int(unit)
except:
print('请重新输入')
else:
total.append(unit)
print('-'*30)
return total
def sum(money):
count = 0
for i in money:
count = count + i
return count
#pic = new_input()
#pay = sum(pic)
#print('你一共消费了'+str(pay)+'元')
#try:
#age = int(input('你今年几岁了'))
#except:
#else:
#if age < 18:
#print('不可以喝酒啊')
#print('程序结束~~')
#stonenumber = 5
#if stonenumber >= 4:
#print('草泥马')
#elif 1<=stonenumber <= 3:
#print('空间和客户')
#else:
#print('发生的快乐和')
scores = {'语':999,'数':997,'英':998}
#def get_average(scores):
# sum_score = 0
# for subject, score in scores.items():
# sum_score += score
# print('客服电话你是%d'%sum_score)
# ave_score = sum_score/len(scores)
# print('开发低价%d'%ave_score)
# get_average(scores)
today_menu={'1':{'2':1}}
for k,v in today_menu.items():
print('得分' + k + '人: ')
for i in v:
print(i,end='')
print()
\ 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