- 博客(7)
- 收藏
- 关注
原创 一到九随机组成的四位数
p=0for a in range(0,10): for b in range(0, 10): for c in range(0, 10): for d in range(0, 10): if a!=b and b!=d and a!=c and a != d and b != c and d != c and a+c==10 and b*d==12: print(a,b,c,d) .
2022-04-21 19:20:48
273
原创 opencv图形检测
import cv2txp=cv2.imread("999.png")ht=txp.copy()def md (txp): yu,oi=cv2.findContours(txp,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_TC89_KCOS) for cnt in yu: area=cv2.contourArea(cnt) if area>1500: cv2.drawContours(ht,...
2022-04-20 21:20:19
2557
原创 概率(A、B队打球)
import randomA=0B=0n=0c=0d=0while A<75 and B<75 and n<=100: c = random.random() d = random.randint(0,100) n += 1 if 0 <= d <= 50: print("A队拿到了球") print("A球投中了") A += .
2022-04-20 21:10:00
85
原创 简易版购物车
z=float((input("输入你的总资产:")))w=0while w==0: tup1={'0':'退出','1':'电脑','2':'鼠标垫','3':'游艇','4':'美女'} tup2={'0':0,'1':100,'2':200,'3':300,'4':998} print(tup1) print(tup2) x = input("请输入你想要的商品序号(按0结束:") if x==0:.
2022-04-20 20:38:16
171
原创 图书管理系统
n = 0m = 0password_book={'1':'1'}#为了方便临时加的账号密码list=['西游记','红楼梦']dict={'sd':'22男120'}def edit_books(): print(list) print('*******************************') print('******添加书籍————————1**********') print('****** 删除书籍———————2**********') .
2022-04-20 20:20:35
172
原创 人脸图片及视频识别
import cv2cap = cv2.VideoCapture(0)cap.set(3,640)#改变高度cap.set(4,480)#改变宽度cap.set(10,100)#改变亮度def Face_Detect_Pic(image): gray = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) cv2.imshow("gray", gray) face_detector = cv2.CascadeClassifier("D:/pyt.
2022-04-20 19:59:37
2948
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人