第三次博客园作业---刘浩

import random as rd
print("num name Python C JAVA AUG")
list_name = ['昂昂', '版本', '尺寸', '的都', '嗯嗯', '丰富', '刚刚', '哈哈', '阿萨', '讲究']
ge_score = []
n = rd.randint(5, 11)
for i in range(0, n):
no = rd.randint(1000, 9999)
name = rd.choice(list_name)
sc_Python = rd.randint(60, 100)
sc_C = rd.randint(60, 100)
sc_JAVA = rd.randint(60, 100)
sc_aver = (sc_Python + sc_C + sc_JAVA) / 3
ge_score.append(sc_aver)
print("2017{} {} {} {} {} {:.2f}".format(no, name, sc_Python, sc_C, sc_JAVA, sc_aver))
print()
ge_score.sort()
py_max = ge_score[-1]
py_min = ge_score[0]

https://gitee.com/mulkd/55555.git

sum_1=input("输入要转换的金额,人民币(用¥表示)美元(用$表示):")
try:
if sum_1[0]=='¥':
sum_2=eval(sum_1[1:])/6
print("兑换后的金额是:${}".format(sum_2))
elif sum_1[0]=='$':
sum_2=eval(sum_1[1:])*6
print("兑换后的金额是:¥{}".format(sum_2))
else:
exit(0)
except:
print("您输入的格式有误,请根据需要输入¥或$")

https://gitee.com/mulkd/2222.git

猜你喜欢

转载自www.cnblogs.com/mulkd/p/10703200.html