### range(start,stop ,step) - 按循序生成整数 #生成整数,参数可是负值,STEP可以是负值,参数可以只是一个整数 for item in range(0,10,2): print(item) 结果: 0 2 4 6 8 列2: for item in range(10) ...
分类:
其他好文 时间:
2021-04-14 12:16:21
阅读次数:
0
from fractions import Fraction def newint(): opr = ['+', '-', '×', '÷'] fh = random.randint(0, 3) n1 = random.randint(1, 20) n2 = random.randint(1, 20 ...
分类:
其他好文 时间:
2021-04-12 12:52:59
阅读次数:
0
package Szys;import java.util.Random; import java.util.Scanner; public class szys { public static void main(String[] args) { int [][] arr=new int[1000 ...
分类:
其他好文 时间:
2021-04-12 12:49:42
阅读次数:
0
好久没有登上来了,刚看到一个大佬调侃的程序员黑文学,我就顺手打了下代码分享出来一起看看到底有多黑。 import random stencil = '{n40}是{v0}{n41},{v1}行业{n30}。{n42}是{v2}{n20}{n43},通过{n31}和{n32}达到{n33}。' \ ' ...
分类:
其他好文 时间:
2021-04-12 12:21:21
阅读次数:
0
import math import random import matplotlib.pyplot as plt import time limitx=300000 limity=300000 threshold=2 data=[] datax=[] datay=[] datanum=20000 ...
分类:
其他好文 时间:
2021-04-09 13:41:22
阅读次数:
0
1.celery介绍 pip install celery == 4.4.7 pip install redis == 3.5.3 pip install eventlet == 0.26.1 Celery 是一个 基于python开发的分布式异步消息任务队列,通过它可以轻松的实现任务的异步处理, ...
分类:
其他好文 时间:
2021-04-08 13:57:36
阅读次数:
0
#include<bits/stdc++.h>using namespace std;int maze [5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 1, 1, 1, 0,0, 0, 0, 1, 0,};typedef struct { ...
分类:
其他好文 时间:
2021-04-07 11:33:01
阅读次数:
0
极坐标 import numpy as np import matplotlib.pylab as plt N = 20 theta = np.linspace(0.0,2*np.pi,N,endpoint=False) #使用linspace间隔均匀分出组距,这里从0到2pi分成N份 radii ...
分类:
其他好文 时间:
2021-04-05 12:45:25
阅读次数:
0
问题:求从起点走到终点的最短路径 Java代码: 1 package com.lzp.maze.dfs; 2 3 import java.util.Scanner; 4 5 /** 6 * @author LZP 7 * @date 2021年4月3日 8 * @Description 9 * @v ...
分类:
其他好文 时间:
2021-04-05 12:41:26
阅读次数:
0
import random print(random.random()) # (0,1) 随机小数 0到1 print(random.randint(3,5))# [3,4,5] 取整 print(random.randrange(3,5))# [3,5) 取整 print(random.choic ...
分类:
其他好文 时间:
2021-04-05 12:02:18
阅读次数:
0