
python学习
大朱-SEU
这个作者很懒,什么都没留下…
展开
-
python核心编程第二版 2.11
题目描述:文本输入,功能选择print '请输入相应功能的标号 1:求输入5个数之和。2:求输入5个数的平均值。3:将5个数大小排序。4:退出程序'a = int(raw_input())p = Truetotal = 0total1 = 0average = 0while p: if a == 1: #求和的功能代码 for i in rang...原创 2018-07-16 11:25:16 · 179 阅读 · 0 评论 -
python核心编程第二版 2.10题目
题目描述:键入合适的数字,否则等到直到合适数字为止p = Truea = int(raw_input('please input a number between [0.100]:'))while p: if a>0 and a<100: print 'good' p = False else: a = int(raw...原创 2018-07-16 10:11:55 · 173 阅读 · 0 评论 -
python核心编程第二版 2.9题目
题目描述;键入5个数,求其平均值。total = 0for i in range(0,5): a =float(raw_input('please input number %d:' %(i+1))) total = total + aprint 'the average is %f' %(total/5)原创 2018-07-16 09:40:48 · 141 阅读 · 0 评论 -
python核心编程第二版 2.8题
题目描述:输入5个数字求其和答total = 0for i in range(5) total = total + int (raw_input('please input 5 numbers'))print total原创 2018-07-15 18:13:25 · 172 阅读 · 0 评论 -
给定一个字符串,找出不含有重复字符的最长子串的长度。 示例: 给定 "abcabcbb" ,没有重复字符的最长子串是 "abc" ,那么长度就是3。 给定 "bbbbb" ,最长的子串就是 "b
Str = raw_input('plese input Str:')def qiu_chongfu(Str2):#定义判断字符串是否含有重复字符,如有返回0,没有返回1 biao = 0 for i in range(0,len(Str2)): for j in range(i+1,len(Str2)): if Str2[i]==St...原创 2018-07-21 11:04:25 · 1178 阅读 · 0 评论 -
Tensorflow学习笔记——基本结构
tensorflow构建神经网络的基本框架1:导入模块,生成数据 import 常量定义 生成数据集2:前向传播 定义输入,输出x = y_= W1 = W2 = a = y = 3:反向传播:定义合适的损失函数,采取合适的反响传播方法loss = train_step = 4:生成绘画,训练step轮w...原创 2018-10-10 10:34:14 · 255 阅读 · 0 评论