![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python应用
葱明绝顶 韭零后
这个作者很懒,什么都没留下…
展开
-
2021-04-20
打开两个C或C++或其它程序语言文件,并显示两个文件内容; 对比两个程序语言源文件,进行重复率检查,给出重复率;注:重复率:连续有n个词相同则计一次重复,n可以通过界面设置进行调整,给出程序设计过程中重复率的设定及计数公式。 两个文件中重复之处用红色标出或者摘录出来,注释部分不计重复率。 编程语言自行选择,界面自行设计,要求有n设置,有重复率显示结果。 import re with open("D:\jiancha.txt",encoding='utf-8') as file1: ..原创 2021-04-20 19:39:59 · 393 阅读 · 1 评论 -
打印月份日历
year=int(input("请输入年份:\t")) month=int(input("请输入月份:\t")) day=0 total=0 space=0 #判断输入的年份是否为闰年 isRun=(year%4==0 and year%100!=0 or year%400==0) #计算1990年到输入年份前的所有天数 for y in range(1990,year): if y%4==0 and y%100!=0 or y%400==0: total+=366 else原创 2021-04-09 15:24:18 · 143 阅读 · 0 评论 -
用turtle画爱心
from turtle import* from math import* setup(3000,3000,10,10) pensize(3) speed(20) hideturtle() up() goto(-600,100) down() color("black") showturtle() circle(40) right(90) fd(70) left(90) fd(40) right(90) fd(60) up() hideturtle() goto(-600,30) right(45) sho原创 2021-04-07 20:58:27 · 184 阅读 · 0 评论