自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 python: assert testing 笔记

from xxx(.py文件)import xxx(def名称) #test functions in the new program def two_output(): expected = (2.5, 1.0) actual = quadratic(2, -7, 5) assert actual == expected, "Test 1 : failed!" expected = 期望的输出结果;actual = 运行function后的实际结果 assert ac..

2021-10-14 22:05:37 139

原创 .join 笔记

ls = ['hello','world','welcome','back'] print(' '.join(ls)) hello worldgood morning enter = int(input('enter a number ')) line = 0 while line < enter: line += 1 num = 0 ls = [] while num <= line: num += 1 ls.appen..

2021-09-19 13:25:44 241

原创 Nested loops笔记

1. Nested loop example- multiple values input and check: break实施后结束内部while loop,由于valid在满足条件后被改为True,也可停止内部while loop。 直到validility check通过,即可i+=1进行下一个输入并检测。因此i+=1需要在外部while loop中体现。 n = 5 i = 0 ls = [] while i < 5: #check validility valid =

2021-09-18 20:30:52 141

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除