1 import random 2 3 4 def print_game(): 5 print("-" * 30) 6 print("step1 欢迎界面 ") 7 print("-" * 5, "欢迎使用AI牌游戏机", "-" * 5) 8 print("-" * 5, "1.猜数游戏", "- ...
分类:
其他好文 时间:
2020-03-23 16:57:32
阅读次数:
70
s = input()t = ""for c in s: if 'a' <= c <= 'z': t += chr( ord('a') + ((ord(c)-ord('a')) + 3 )%26 ) elif 'A'<=c<='Z': t += chr( ord('A') + ((ord(c)-or ...
分类:
其他好文 时间:
2020-03-22 21:18:53
阅读次数:
161
Digital Filter Design Introduction The purpose of this book is to provide you with different theorethical and practical approaches to digital filter d ...
分类:
其他好文 时间:
2020-03-22 20:02:25
阅读次数:
139
思路:设二维dp数组, 一维表示当前到数字的哪一位, 二维为0表示在当前位置时所需的最低货币值,为1表示当前位置+1时所需的最低货币值 代码: 1 import numpy as np 2 dp = np.zeros(shape=(10002, 2), dtype=int) 3 4 s = inpu ...
分类:
其他好文 时间:
2020-03-22 19:47:45
阅读次数:
80
import cv2import numpy as np#视频读取def video_demo(): capture = cv2.VideoCapture(0) while(True): ret, frame = capture.read() #frame = cv2.flip(frame,1) # ...
分类:
编程语言 时间:
2020-03-22 19:25:32
阅读次数:
94
Form要么是绑定了数据的,要么是未绑定数据的。 如果是绑定的,那么它能够验证数据,并渲染表单及其数据,然后生成HTML表单。如果未绑定,则无法进行验证,但它仍然可以以HTML形式呈现空白表单。 表单类原型:class Form[source] 若要创建一个未绑定的Form实例,只需简单地实例化该类 ...
[TOC] "Leetcode 1052" 问题描述 例子 方法 1. 使用滑动窗口windows记录不满意的客户数(X分钟)。当滑动窗的宽度大于X时从滑动窗的左端减去不满意的客户 windows = grumpy[i X] customers[i X]; 2. 使用satisfied记录satis ...
分类:
其他好文 时间:
2020-03-22 16:18:46
阅读次数:
100
a = int(input("a:")) b = int(input("b:")) if a > b : print(a) else : print(b) ...
分类:
编程语言 时间:
2020-03-22 10:44:34
阅读次数:
180
问题描述: 有一兔子,从出生后第3个月起每个月都生一兔子, 小兔子长到第三个月后每个月又生一对兔子 ,假如兔子都不死,问每个月的兔子总数为多少? 问题分析: 月份 兔子数 分析 1 1 f(1)=1 2 1 f(2)=1 3 1+1 f(3)=2 4 1+1 +1 f(4)=3 5 1+1+1 +1 ...
分类:
其他好文 时间:
2020-03-21 23:27:38
阅读次数:
88
1、语句和函数: 1)赋值语句:赋值语句用于给变量赋予新的数据值;赋值语句右侧的数据类型同时作用与变量; 2)分支语句:根据判断条件来决定程序的运行方向;涉及的保留字有:if , elif , else ; (eg: if Tempstr[-1] in ['F','f']: #如果条件True ,则 ...
分类:
编程语言 时间:
2020-03-21 23:23:10
阅读次数:
86