随笔分类 -  Python基础

摘要:# -*- coding:utf-8 -*- ''' @project: jiaxy @author: Jimmy @file: study_logging.py @ide: PyCharm Community Edition @time: 2018-12-08 14:04 @blog: https://www.cnblogs.com/gotesting/ ''' ''' 日志:记录代码... 阅读全文
posted @ 2018-12-08 16:42 JiaxyGogogo 阅读(415) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*- ''' @project: jiaxy @author: Jimmy @file: study_ddt.py @ide: PyCharm Community Edition @time: 2018-12-06 14:48 @blog: https://www.cnblogs.com/gotesting/ ''' ''' study_d... 阅读全文
posted @ 2018-12-08 14:01 JiaxyGogogo 阅读(301) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*- ''' @project: jiaxy @author: Jimmy @file: read_config.py @ide: PyCharm Community Edition @time: 2018-12-06 13:53 @blog: https://www.cnblogs.com/gotesting/ ''' ''' 配置文件 ... 阅读全文
posted @ 2018-12-06 14:17 JiaxyGogogo 阅读(489) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*- ''' @project: jiaxy @author: Jimmy @file: do_excel.py @ide: PyCharm Community Edition @time: 2018-12-05 11:11 @blog: https://www.cnblogs.com/gotesting/ ''' from openpyxl... 阅读全文
posted @ 2018-12-05 11:51 JiaxyGogogo 阅读(445) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: study_unittest.py@ide: PyCharm Community Edition@time: 2018-11-24 09:00@blog: https://www.cnblogs.com/gotesting/'''''' 单元测试框架:unittest 、... 阅读全文
posted @ 2018-11-24 10:47 JiaxyGogogo 阅读(274) 评论(0) 推荐(0)
摘要:'''5:购物车类,包含的功能如下,请自行设计这个类以及类里面的方法:1)用户输入工资后,打印商品列表(商品列表自行设计展示模式)2)允许用户根据商品编号去选择商品3)用户选择商品后,检查余额是否足够,够的话直接扣款,不够的话就对用户做出提醒4)用户可以随时退出,退出时打印用户的购买商品以及余额''' class ShoppingTrolley: commodity_list = {'1':... 阅读全文
posted @ 2018-11-20 15:13 JiaxyGogogo 阅读(358) 评论(0) 推荐(1)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: work_20181119.py@ide: PyCharm Community Edition@time: 2018-11-19 13:53@blog: https://www. 阅读全文
posted @ 2018-11-19 17:16 JiaxyGogogo 阅读(479) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: study_类与对象.py@ide: PyCharm Community Edition@time: 2018-11-19 09:43@blog: https://www.cnb 阅读全文
posted @ 2018-11-19 11:55 JiaxyGogogo 阅读(198) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: study_文件处理.py@ide: PyCharm Community Edition@time: 2018-11-13 10:32@blog: https://www.cnb 阅读全文
posted @ 2018-11-13 11:39 JiaxyGogogo 阅读(191) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: study_文件目录操作.py@ide: PyCharm Community Edition@time: 2018-11-13 09:06@blog: https://www.cnblogs.com/gotesting/'''''' 目录处理:OS'''import os... 阅读全文
posted @ 2018-11-13 10:31 JiaxyGogogo 阅读(156) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: study_模块导入.py@ide: PyCharm Community Edition@time: 2018-11-10 10:26@blog: https://www.cnb 阅读全文
posted @ 2018-11-10 10:55 JiaxyGogogo 阅读(180) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: study_函数的相互调用及变量的作用域.py@ide: PyCharm Community Edition@time: 2018-11-10 10:04@blog: https 阅读全文
posted @ 2018-11-10 10:26 JiaxyGogogo 阅读(413) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: work_20181108.py@ide: PyCharm Community Edition@time: 2018-11-08 16:01@blog: https://www.cnblogs.com/gotesting/'''# 1:一个足球队在寻找年龄在x岁到y岁的小女孩(... 阅读全文
posted @ 2018-11-08 17:02 JiaxyGogogo 阅读(252) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: study_函数.py@ide: PyCharm Community Edition@time: 2018-11-08 09:08@blog: https://www.cnblogs.com/gotesting/'''# 函数# append pop insert len ... 阅读全文
posted @ 2018-11-08 16:01 JiaxyGogogo 阅读(180) 评论(0) 推荐(0)
摘要:# -*- coding:utf-8 -*-'''@project: jiaxy@author: Jimmy@file: work_20181107.py@ide: PyCharm Community Edition@time: 2018-11-07 10:46@blog: https://www. 阅读全文
posted @ 2018-11-07 11:50 JiaxyGogogo 阅读(335) 评论(0) 推荐(0)
摘要:#-*- coding:utf-8 -*-# author:jiaxy# datetime:2018/11/3 11:48# software: PyCharm Community Editiondict = { '广东':['深圳','广州','阳江'], '湖南':['长沙','益阳','怀化'], '湖北':['武汉','襄阳','黄冈'],}# 从控制台输入一个省份# 根... 阅读全文
posted @ 2018-11-03 12:06 JiaxyGogogo 阅读(236) 评论(0) 推荐(0)
摘要:#-*- coding:utf-8 -*-# author:jiaxy# datetime:2018/11/3 11:27# software: PyCharm Community Edition# 条件语句# 根据不同的条件,对不同的情况,做出不同的处理# if 条件表达式:值为布尔值# if后面的表达式为True,才会执行if后面的子代码score = 80if score > 95: ... 阅读全文
posted @ 2018-11-03 11:48 JiaxyGogogo 阅读(166) 评论(0) 推荐(0)
摘要:#-*- coding:utf-8 -*-# author:jiaxy# datetime:2018/11/3 10:47# software: PyCharm Community Edition# 运算符# 1. 算术运算符# 加减乘除 + - * /# 取模/取余 % 常用场景:判断奇偶数a = 10b = 3c = a / bd = a % bprint(c)print(int(c))... 阅读全文
posted @ 2018-11-03 11:27 JiaxyGogogo 阅读(171) 评论(0) 推荐(0)
摘要:#-*- coding:utf-8 -*-# author:jiaxy# datetime:2018/11/3 9:58# software: PyCharm Community Edition# 字典 无序dict# 空字典是允许的# 字典里面的值 是 key:value成对存在的# value可以是任意类型;key值是不可变的。d = {'class_id':'python12','age':... 阅读全文
posted @ 2018-11-03 10:46 JiaxyGogogo 阅读(106) 评论(0) 推荐(0)
摘要:题目: 1:L = [ ['Apple', 'Google', 'Microsoft'], ['Java', 'Python', 'Ruby', 'PHP'], ['Adam', 'Bart', 'Lisa']] 打印Apple、Python、Lisa 2:完成列表a=[1,7,4,89,34,2] 阅读全文
posted @ 2018-11-01 17:54 JiaxyGogogo 阅读(206) 评论(0) 推荐(0)