摘要: import matplotlib.pyplot as plt plt.plot([3, 1, 4, 5, 2]) #只有一个输入列表或数组时,参数被当做Y轴,X轴以索引自动生成 plt.ylabel("Grade") plt.savefig('test', dpi=600) #记录为PNG文件 p 阅读全文
posted @ 2022-01-09 11:49 笑诺 阅读(39) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*- """ Created on Sat Jan 8 10:20:12 2022 求年支 @author: Administrator """ n = int(input('请输入阳历年:')) print(n) n1 = (n-3) % 10 #取余数 阅读全文
posted @ 2022-01-08 11:07 笑诺 阅读(34) 评论(0) 推荐(0)
摘要: 1 from scipy import stats 2 import numpy as np 3 4 # np.log = ln 求自然对数 5 6 # stats.norm.cdf(d1, 0.0, 1.0) = N 累积正态分布 7 8 v = 0.195 9 t = 62 / 365 10 V 阅读全文
posted @ 2021-11-25 20:40 笑诺 阅读(79) 评论(0) 推荐(0)
摘要: 1 # -*- coding: utf-8 -*- 2 """ 3 Created on Wed Nov 24 20:12:47 2021 4 求隐波 5 @author: Administrator 6 """ 7 8 from scipy import stats 9 import numpy 阅读全文
posted @ 2021-11-25 20:37 笑诺 阅读(192) 评论(0) 推荐(0)
摘要: 数字 a1=123 a2 = 456 整形 int 将字符串转换为数字int() 以x进制进行转换int(a, base=x) .bit_length()方法:当前数字的二进制,至少用n位表示 浮点型 float 字符串str 首字母大写.capitalize() 变小写.casefold(), . 阅读全文
posted @ 2020-06-05 20:47 笑诺 阅读(108) 评论(0) 推荐(0)
摘要: 1 name = "郑建文" 2 3 # "郑建文" 字符串 4 # "郑" 字符 5 # "建文" 子字符串, 子序列 6 7 if "建文" in name: 8 print("OK") 9 else: 10 print('Error') PYcharm中整体注释:ctrl + ? if "建文 阅读全文
posted @ 2020-06-02 20:30 笑诺 阅读(62) 评论(0) 推荐(0)
摘要: 代码块 if 1 == 1: print("") print("") # TAB else: print("") if 1==1: print("") print("") print('end') 可以嵌套: 1 if 1 == 1: 2 if 2 == 2: 3 print("") 4 print 阅读全文
posted @ 2020-06-01 18:08 笑诺 阅读(73) 评论(0) 推荐(0)
摘要: 一、Linux基础 计算机以及日后程序放置的服务器的简单操作 二、Python开发 Python基础基础1.第一句python - 后缀名可以是任意 -导入模块时,如果不是.py文件,会出错 ==>以后文件后缀名是py2.两种执行方式 python解释器 py文件路径 python 进入解释器: 实 阅读全文
posted @ 2020-06-01 17:53 笑诺 阅读(25) 评论(0) 推荐(0)