摘要: 一、灰度预测+LinearSVR import pandas as pd import numpy as np from sklearn.linear_model import Lasso inputfile = '../data/data.csv' # 输入的数据文件 data = pd.read 阅读全文
posted @ 2022-04-06 21:17 VVsin 阅读(586) 评论(0) 推荐(0)
摘要: 一、用神经网络Sequential(序贯模型)搭建 代码: import pandas as pd import numpy as np #导入划分数据集函数 from sklearn.model_selection import train_test_split #读取数据 datafile = 阅读全文
posted @ 2022-03-27 22:22 VVsin 阅读(184) 评论(0) 推荐(0)
摘要: 一、需求分析 1.能自动生成小学四则运算题目并且每一道题目的运算结果不能为负; 2.数字在0-100,运算符2-5个; 3.输入参数n,随机产生n道加减乘除。 二、功能设计 基础功能:四则运算,随机产生n道算式题目; 升级功能:1)带有两位小数的两个数之间加减运算; 2)两个分数之间加减乘除运算; 阅读全文
posted @ 2021-09-21 23:38 VVsin 阅读(109) 评论(0) 推荐(0)
摘要: 一、文件读写的读书笔记 1、文件是数据的抽象和集合。 2、文件有两种展现形态:(1)文本文件:单一特定编码组成,如UTF-8编码组成的 .txt文件和 .py文件;(2)二进制文件:直接有比特0和比特1组成,没有统一字符编码,如 .png文件和 .avi文件。 3、python对文本文件和二进制文件 阅读全文
posted @ 2020-05-27 14:03 VVsin 阅读(134) 评论(0) 推荐(0)
摘要: Numpy定义:NumPy(Numerical Python) 是 Python 语言的一个扩展程序库,支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库。它主要用于数组计算,包括: 一个强大的N维数组对象 ndarray广播功能函数整合 C/C++/Fortran 代码的工具线性 阅读全文
posted @ 2020-05-06 18:41 VVsin 阅读(202) 评论(0) 推荐(0)
摘要: def hannuo(n,a,b,c): if n == 1: print(a,"->",c) else: hannuo(n-1,a,c,b)#将最后一个盘子移到c print(a,"->",c)#将剩余的盘子移动c hannuo(n-1,b,a,c) n = int(input()) hannuo 阅读全文
posted @ 2020-03-31 23:08 VVsin 阅读(212) 评论(0) 推荐(0)
摘要: import time scale=50 print("执行开始".center(scale//2,"-")) start=time.perf_counter() for i in range(scale+1): a='*' *ic b='·' *(scale-i) c=(i/scale)*100 阅读全文
posted @ 2020-03-25 17:16 VVsin 阅读(173) 评论(0) 推荐(0)
摘要: import turtle turtle.pensize(10) turtle.color('purple','pink') turtle.begin_fill() turtle.forward(100) turtle.right(120) turtle.forward(100) turtle.ri 阅读全文
posted @ 2020-03-15 22:45 VVsin 阅读(339) 评论(0) 推荐(0)
摘要: import turtle turtle.screensize(1000,1000,"green") turtle.pensize(10) turtle.color('pink','purple') turtle.begin_fill() turtle.left(60) turtle.forward 阅读全文
posted @ 2020-03-15 22:41 VVsin 阅读(251) 评论(0) 推荐(0)
摘要: import turtle turtle.color('black','red') turtle.pensize(10) turtle.begin_fill() for i in range(5): turtle.fd(200) turtle.rt(144) turtle.end_fill() 阅读全文
posted @ 2020-03-15 22:17 VVsin 阅读(205) 评论(0) 推荐(0)