2019年8月6日

税率计算

摘要: 1 # !/usr/bin/python36 2 # -*- coding: UTF-8 -*- 3 __author__ = 'zp' 4 5 temp = ['不含税收入金额', '增值税税额', '城建税税额', '教育费附加税额', '地方税金额', '印花税', '水利基金'] 6 temp_01 = {} 7 k = 0 8 9 10 class TaxCal... 阅读全文

posted @ 2019-08-06 13:25 新手爱好者 阅读(104) 评论(0) 推荐(0) 编辑

简易计算器

摘要: 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 # @Time : 2019/7/31 15:16 4 # @Author : Aries 5 # @Site : 6 # @File : 简易计算器.py 7 # @Software: PyCharm 8 9 # 导入tkinter模块 10 from tk... 阅读全文

posted @ 2019-08-06 13:18 新手爱好者 阅读(129) 评论(0) 推荐(0) 编辑

2018年2月11日

函数《潭州学院(心蓝)》

摘要: 1 def print_twice(arg): 2 """ 3 打印两次 4 :param arg: 5 :return: 6 """ 7 print(arg) 8 print(arg) 9 return arg 10 11 res = print_twice('hello word') 12 print(res... 阅读全文

posted @ 2018-02-11 23:06 新手爱好者 阅读(217) 评论(0) 推荐(0) 编辑

2018年2月6日

script,first,second,third=argv运行出错的问题

摘要: 看“笨办法”学python,的问题 不管是在那里直接运行都提示错误,原因如下: sys.argv是传递给python脚本的命令行参数【字符串】列表argv[0]为该脚本自身路径,其余为命令行参数你交互式运行没有参数“script,first,second,thrid=argv”这句自然会报错请在命令 阅读全文

posted @ 2018-02-06 16:40 新手爱好者 阅读(531) 评论(0) 推荐(0) 编辑

2018年2月1日

tkinter高级图形课程

摘要: 调用 阅读全文

posted @ 2018-02-01 21:31 新手爱好者 阅读(189) 评论(0) 推荐(0) 编辑

2018年1月30日

pycharm 调用turtle模块时,窗口闪屏不能显示

摘要: #如下代码时,在pycharm中运行时,窗口在程序结束后,直接关闭,不能看到绘制的图像. #在python自带的IDE中,在执行代码后,可以看到窗口的显示。 import turtle t = turtle.Pen() t.forward(50) #百度了一下:发现要想让窗口在pycharm中显示,不关闭,需要在最后加一句:turtle.done() ,即可,代码如下: imp... 阅读全文

posted @ 2018-01-30 00:09 新手爱好者 阅读(3229) 评论(1) 推荐(0) 编辑

2018年1月29日

小球碰撞 pygame

摘要: 1 #!/usr/bin/python 2 # -*- coding: UTF-8 -*- 3 # python 27 4 5 import pygame, sys 6 pygame.init() 7 screen = pygame.display.set_mode([640,480]) 8 scr 阅读全文

posted @ 2018-01-29 15:28 新手爱好者 阅读(218) 评论(0) 推荐(0) 编辑

pygame 图形

摘要: 如果想改变一个像素的颜色,可以不使用 draw 函数,而利用 Surface.set_at() 方法访问一个表面上的单个像素。你要指出希望设置哪个像素,以及设置成什么颜色: Surface.set_at([x, y], [0, 0, 0]). 还可以用 Surface.set_at() 方法检查一个 阅读全文

posted @ 2018-01-29 13:42 新手爱好者 阅读(237) 评论(0) 推荐(0) 编辑

2018年1月28日

爬虫(抄)费老劲抄完

摘要: 1 #!/usr/bin/python 2 # -*- coding: UTF-8 -*- 3 # python 36 4 __author_ = '' 5 import requests 6 import re 7 import os 8 9 domian = 'http://www.sjtxt.la' 10 11 def get_novel_sort_list(): 1... 阅读全文

posted @ 2018-01-28 02:26 新手爱好者 阅读(142) 评论(0) 推荐(0) 编辑

2018年1月26日

对象14

摘要: 1 #!/usr/bin/python 2 # -*- coding: UTF-8 -*- 3 4 class HotDog: 5 def __init__(self): 6 self.cooked_level=0 7 self.cooked_string="生" 8 self.condiments=[] 9 10 ... 阅读全文

posted @ 2018-01-26 14:40 新手爱好者 阅读(104) 评论(0) 推荐(0) 编辑

导航