- 博客(5)
- 收藏
- 关注
原创 【无标题】
Pythonord() 函数返回ASCII码ord('a')return 97Pythoncontinue 语句Python continue 语句跳出本次循环,而break跳出整个循环。continue 语句用来告诉Python跳过当前循环的剩余语句,然后继续进行下一轮循环。continue语句用在while和for循环中。Pythonfloor 语句from math import floormath.floor(-45.17)return -46...
2021-11-25 16:10:10
391
原创 学习记录之sum()
最近在pynative上练习python,遇到了这样的一个题目,Exercise 2: Print the sum of the current number and the previous numberWrite a program to iterate the first 10 numbers and in each iteration, print the sum of the current and previous number.output:Printing current
2021-11-16 23:40:57
538
原创 Python 学习小技巧
现在在上的课经常用到python,想要通过这个文章记录一些小技巧1.编写API# The API of the function:## name(x, h, noff_m, noff_h)# Returns the discrete, linear convolution of two sequences.## Parameters: # x,h: array_like# The 2 input sequences.#
2021-11-16 00:06:40
699
原创 numpy之histogram
numpy.histogram(a, bins=10, range=None, normed=None, weights=None, density=None)
2021-11-14 15:55:34
3624
原创 python解析命令行——Argparse
import sysdef test(): print("test")if sys.argv[1]=="-t": #进行单元测试 test()else: length = sys.argv[1] #将命令行输入的第一个参数赋值给length filename = sys.argv[2] #将命令行输入的第二个参数赋值给filenameprint(length,f.
2021-11-12 00:28:55
1020
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人