摘要: 一、模块导入的方式: 方式一:import 模块名 使用时:模块名.函数名() 方式二 :from 模块名 import 函数名 使用时:函数名() 方式三: from 模块名 import * 导入该模块下所有的方法 使用时:函数名() 方式四:from 模块名 import 函数名 as a(自 阅读全文
posted @ 2018-12-08 15:52 张小妍 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-12-08 15:02 张小妍 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Windows环境下python的安装和使用 一、下载 Python的官方网站下载:http://www.python.org,通常包括解释器、库文件及简单的编码环境(IDLE)。 二、安装 注:使用默认配置,选择“Install Now”,勾选下面的Add Python3.5 to PATH(这样 阅读全文
posted @ 2018-12-08 14:53 张小妍 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 简单小程序的实现: 1 for i in range(1,10): 2 for j in range(1,i+1): 3 print('%d*%d=%d'%(j,i,j*i),end='\t') 4 print() def login(username,password): if (username 阅读全文
posted @ 2018-12-08 14:17 张小妍 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 一、异常简介 如:任意输入3个数,判断能否组成三角形,判断用户输入的数据是否大于0的数字。 二、常见的异常类型 阅读全文
posted @ 2018-12-08 14:07 张小妍 阅读(158) 评论(0) 推荐(0) 编辑