自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 七段电子彩色数码管绘制

2022-12-26 21:57:37 95 1

原创 三锥图形的绘制

import matplotlib.pyplot as pltimport numpy as npfrom mpl_toolkits.mplot3d import Axes3Dfig=plt.figure(figsize=(12,6))ax=Axes3D(fig)X,Y=np.mgrid[-3:3:108j,-3:3:100j]Z=np.exp(-X**2-Y**2)surf=ax.plot_surface(X,Y,Z,rstride=1,cstride=1,cmap=plt.get_cmap

2022-12-26 21:46:45 227

原创 多区域绘制

#多区域绘制import numpy as np import matplotlib.pyplot as pltdef f(t): return np.exp(-t)*np.cos(2*np.pi*t)a=np.arange(0,5,0.02)plt.subplot(322)plt.plot(a,f(a))plt.subplot(323)plt.plot(a,np.cos(2*np.pi*a),'-.',color='r')plt.subplot(324)plt.plo

2022-12-26 21:44:12 101

原创 同一绘图区域绘制多图

import numpy as npimport matplotlib.pyplot as plta=np.arange(10)plt.plot(a,a**1.5,'ro-',label='a')plt.plot(a,-a**2.5,'gx:',label='b')plt.plot(a,-a*6.5,'y*',label='c')plt.plot(a,a*4.5,'bs-',label='d')plt.plot(a,-a*10.5,'mH--',label='e')plt.savefig('

2022-12-26 21:42:58 90

原创 place布局

#place布局.pyfrom tkinter import *root=Tk()root.title('登录')root.geometry('400x200')root.config(bg='#ffcc00')label_1=Label(root,text='用户名',width=6)entry_1=Entry(root,width=20)label_2=Label(root,text='密码',width=6)entry_2=Entry(root,width=20,show='*')

2022-12-08 17:00:22 246

原创 calendar

#显示给定年份的日历#打印日历函数def printMonth(year,month): printMonthTitle(year,month) printMonthBody(year,month)#打印标题栏显示月份与年份def printMonthTitle(year,month): print(" ",getMonthName(month)," ",year) print("-------------------------------------

2022-11-27 18:04:11 50

原创 calendar

import calendar#输入指定的年月yy=int(input("输入年份:"))mm=int(input("输入月份:"))#显示月日历print(calendar.month(yy,mm))#显示年日历print(calendar.prcal(yy,m=6)) #使用calendar里的prcal函数,m参数可以显示几个月#给定某一天,判断是星期鸡print(calendar.weekday(2022,9,9))#判断是不是闰年print(calendar.isleap(2

2022-11-27 18:02:47 77

原创 九九乘法表

# for循环实现乘法口诀表for i in range(1, 10): for j in range(1, i+1): print("%d * %d = %d " % (j, i, i * j), end="") # end = ""保证每一行输出不换行 if j == i: print("") # 每一行输出最后一组乘法时换行 j = j + 1 i = i + 1

2022-11-27 18:00:28 111

原创 Day Day Up

def dayup(df): dayup = 1 for i in range(365): if i % 7 in [6,0]: dayup = dayup*0.99 else: dayup = dayup*(1+df) return dayupdayfacter = 0.01while dayup(dayfacter) < 37.78: dayfacter = dayfacter+0.

2022-11-27 17:59:24 90

原创 蟒蛇绘制方法

import turtlecolors=['pink','purple','orange','green']turtle.setup(650,350,200,200)#设置画笔起点位置turtle.penup()turtle.fd(-250)# 沿X轴负方向前进250像素turtle.pendown()turtle.pensize(25)turtle.seth(-40)#设置画笔从-40度开始画for i ,color in zip(range(4),colors):#分别移动 tu

2022-11-27 17:56:59 87

原创 五角星制作

2022-11-20 19:21:00 77

原创 TempConcert.py

#TempConvert.pyTempStr = input("请输入带有符号的温度值:")if TempStr[-1] in ['F','f']: C = (eval(TempStr[0:-1]) - 32)/1.8 print("转换后的温度是{:.2f}C".format(C))elif TempStr[-1] in ['C','c']: F = 1.8*eval(TempStr[0:-1]) + 32 print("转换后的温度是{:.2f}F".format(

2022-11-19 16:52:43 188

原创 python制作万圣节贺卡

holiday = input("请输入节日名称:") # 提示输入内容To_name = input("请输入收件人的姓名:")Fr_name = input("请输入送件人的姓名:")print("--*--*--*--*--*--*--*--*--")print("--*--*--*--*--*--*--*--*--")print(" ")print(" ")print(" 节 日 祝 福 ") # 贺卡标题print()print()print(

2022-11-01 17:17:02 537 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除