热门

最新

红包

立Flag

投票

同城

我的

发布
qq_56258561
橘子504
5 年前
trueqq_56258561

不会

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
面向过程# 1.用字典存储姓名和分数student1 = {'name': '贝贝', 'score': 98}student2 = {'name': '闻闻', 'score': 93}# 2.定义打印分数的函数def print_score(student): print('姓名:%s,分数:%d' % (student['name'], student['score']))# 3.调用打印分数的函数print_score(student1)print_score(student2)
立即登录