摘要:
scores=[67,38,65,98,78,54] max(scores) min(scores) masScores=scores[0] forScore in scores: if Score>masScore: maxScore=score #将更大值变更为最大值 print(maxScor 阅读全文
posted @ 2022-07-28 15:01
测试小潘
阅读(82)
评论(0)
推荐(0)
摘要:
循环结构 for 循环 for x in range(1,10): print("hellow") for循环 #遍历容器 #将容器或序列中的数据一个一个取出来 for x in 列表名: print() #直接遍历 names = ["张三","李四","王五","李留","王二麻子"] for 阅读全文
posted @ 2022-07-28 14:08
测试小潘
阅读(28)
评论(0)
推荐(0)
摘要:
小数转换二进制时无法精确去转换 round()函数时用来保留制定的小数位 a=15.3 b=3 c=a/b print(round(c,2)) 阅读全文
posted @ 2022-07-28 13:25
测试小潘
阅读(83)
评论(0)
推荐(0)

浙公网安备 33010602011771号