码迷,mamicode.com
首页 >  
搜索关键字:raw_input    ( 787个结果
python简单学生成绩管理系统
#!/usr/bin/env python#manage the grade of studentdef init(date): date=[[],[],[],[],[]] return datedef store(date): ID=raw_input('Please your ...
分类:编程语言   时间:2015-09-25 18:27:08    阅读次数:428
丰沛数_不足数_完全数
因数的和比数字本身大的数称为丰沛数。因数的和比数字本身小的数称为不足数。完全数是一个整数:其因数之和(不含本身打因素)加起来就是数字本身。 1 theNum = int(raw_input('Please input a number to check:')) 2 3 divisor = 1 4 ....
分类:其他好文   时间:2015-09-23 00:52:10    阅读次数:233
python 2.7 中文教程及自动化测试介绍(2)
流程控制 除了前面介绍的 while 语句,Python还更多的流程控制工具。 if语句 >>>?x?=?int(raw_input("Please?enter?an?integer:?")) Please?enter?an?integer:?42 >>>?if?x?<?0: ...?????x?...
分类:编程语言   时间:2015-09-19 12:34:30    阅读次数:200
SHOPING 购物(学了老男孩视频写的)​
#!/usr/bin/pythonimportsyslogimportsysthis_year=2015product=[‘apple‘,‘coffee‘,‘pc‘,‘rebot‘,‘clothes‘,‘licai‘]#创建数组price=[4999,30,8000,100000,1000,500]#创建数组qingdan=[]#创建数组whileTrue:try:gongz=int(raw_input(‘\033[33;1mpleaseinputyougz:\033[0m‘).str..
分类:其他好文   时间:2015-09-18 12:08:18    阅读次数:202
HihoCoder - Thare's roads.
#1000 : A + B Pythonwhile True: try: a,b = raw_input().split() print int(a) + int(b) except EOFError: breakView Code
分类:其他好文   时间:2015-09-16 18:03:10    阅读次数:146
python核心编程第5章课后题答案
5-8Geometryimport mathdef sqcube(): s = float(raw_input('enter length of one side: ')) print 'the area is:', s ** 2., '(units squared)' print 'the ...
分类:编程语言   时间:2015-09-15 12:28:51    阅读次数:141
python核心编程第2章课后题答案(第二版36页)
2-5 Loops and Numbers a) i = 0 while i 0: print 'positive' else: print 'zero'2-7 Loops and strings s = raw_input('enter a string:') for ...
分类:编程语言   时间:2015-09-14 20:54:15    阅读次数:198
9.12 9-26节
1.反斜杠以及转义字符的用法多上网查资料2.输入print "how old are you?"age = raw_input()age = raw_input("how old are you?")结果:how old are you?_ (输入)how old are you?_(输入)prin...
分类:其他好文   时间:2015-09-12 16:00:49    阅读次数:158
python中两段登陆代码的比较
两段登陆代码的比较第一段valid_user=‘chuan‘valid_passwd=‘123‘user_input=raw_input("Yourusername:")passwd=raw_input("Yourpassword:")ifuser_input==valid_user:ifpasswd==valid_passwd:print"Welcome%slogintooursystem!"%user_input else: print"invalidusername!Byeby..
分类:编程语言   时间:2015-09-08 12:39:21    阅读次数:196
Python 笔记1 input 与raw_input
尝试写一个猜字游戏时,使用了raw_input()作为输入。代码如下。think = 53guess = raw_input("Guess what I think\n")while True: if guess > think: print "It's too big." ...
分类:编程语言   时间:2015-09-06 01:10:30    阅读次数:186
787条   上一页 1 ... 57 58 59 60 61 ... 79 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!