练习71: 题目: 编写input()和output()函数输入,输出5个学生的数据记录。 程序: N = 5 # stu # num : string # name : string # score[4]: list student = [] for i in range(5): student. ...
分类:
编程语言 时间:
2021-03-06 14:13:52
阅读次数:
0
1、目前工作上有一堆的ip地址,ip是ok的,但是需要找出来不在这里面的其他ip import os a = list() with open('ip.txt','r') as f: #print(f.readlines()) for line in f.readlines(): a.append( ...
分类:
其他好文 时间:
2021-03-05 13:28:22
阅读次数:
0
Application Application=a driver program + executors 一般来说:1个SparkContext = 1个application=1个SparkShell Spark提交任务不一定须在集群里提交,有gateway就行 1个application ==> ...
分类:
系统相关 时间:
2021-03-04 13:20:14
阅读次数:
0
仅供自己学习 思路: 这个题和上一个题目类似,都是先存储从起始位置到该位置的和。唯一需要特别处理的就是怎么求和。 这里得注意sums的下标与矩阵下标的关系。可以画出一个矩阵,能得到 sums[i+1][j+1]=sums[i+1][j]+sums[i][j+1]-sums[i][j]+matrix[ ...
分类:
其他好文 时间:
2021-03-04 13:16:07
阅读次数:
0
Jaw crusher has a wide range of applications. Our company uses high manganese steel and metamorphic high manganese steel to produce various specificat... ...
分类:
其他好文 时间:
2021-03-03 12:29:19
阅读次数:
0
挖坑填数方 从数列中挑出一个元素,称为 "基准"(pivot); 重新排序数列,所有元素比基准值小的摆放在基准前面,所有元素比基准值大的摆在基准的后面(相同的数可以到任一边)。在这个分区退出之后,该基准就处于数列的中间位置。这个称为分区(partition)操作; 递归地(recursive)把小于 ...
分类:
编程语言 时间:
2021-03-02 12:25:49
阅读次数:
0
质数:大于1的自然数中,除了1和它本身以外不再有其他因数的自然数 因数:指整数a除以整数b(b≠0) 的商正好是整数而没有余数,我们就说b是a的因数。 num = int(input("输入一个数字: ")) if num > 1: # for i in range(2, num ): 这是我一开始 ...
分类:
编程语言 时间:
2021-02-26 13:31:27
阅读次数:
0
一:作用 二:定义 三:类型转换 四:内置方法 一:列表类型的作用 如果需存多个值并按顺序取,那用list再合适不过了 二:列表类型的定义 l = [1,2,3,'a'] ##相当于l = list(1,2,3,'a') print(l)print(type(l)) 以上代码执行结果为: [1, 2 ...
分类:
编程语言 时间:
2021-02-26 13:20:23
阅读次数:
0
问题: 给定二叉树,进行层序遍历,从底层向上输出。 Example 1: Input: root = [3,9,20,null,null,15,7] Output: [[15,7],[9,20],[3]] Example 2: Input: root = [1] Output: [[1]] Exam ...
分类:
其他好文 时间:
2021-02-26 12:54:45
阅读次数:
0
import matplotlib.pyplot as plt # 定义一个画图函数 def sinplot(flip = 1): x = np.linspace(0,10,100) for i in range(1,4): y = np.sin(x + i * 0.5) * (4 - i) * f ...
分类:
其他好文 时间:
2021-02-24 13:05:31
阅读次数:
0