![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python学习
大朱-SEU
这个作者很懒,什么都没留下…
展开
-
python核心编程第二版 2.11
题目描述:文本输入,功能选择print '请输入相应功能的标号 1:求输入5个数之和。2:求输入5个数的平均值。3:将5个数大小排序。4:退出程序' a = int(raw_input()) p = True total = 0 total1 = 0 average = 0 while p: if a == 1: #求和的功能代码 for i in rang...原创 2018-07-16 11:25:16 · 140 阅读 · 0 评论 -
python核心编程第二版 2.10题目
题目描述:键入合适的数字,否则等到直到合适数字为止p = True a = 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 · 149 阅读 · 0 评论 -
python核心编程第二版 2.9题目
题目描述;键入5个数,求其平均值。total = 0 for i in range(0,5): a =float(raw_input('please input number %d:' %(i+1))) total = total + a print 'the average is %f' %(total/5)原创 2018-07-16 09:40:48 · 111 阅读 · 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 · 129 阅读 · 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 · 1134 阅读 · 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 · 225 阅读 · 0 评论