淘宝面试题猜数字游戏,淘宝试题猜数字,guess.py#!/u
淘宝面试题猜数字游戏,淘宝试题猜数字,guess.py#!/u
guess.py
#!/usr/bin/env python#guess a number between 1-100#if it is smaller ,tell you smaller#if it is bigger,just tell you are wrongfrom random import randintnum = randint(1,100)print numflag = Truecount = 14while count>0: count-=1; number = int(raw_input('input the number:')) if number == num: print 'good!!' break else: if number<num and flag: print 'smaller,please pick a bigger one' else: print 'wrong' if flag: flag = Falseelse: print 'you lose'
相关内容
- darkBing SQL扫描器0.1,darkbing扫描器0.1,[Python]代码#!
- 深度优先遍历嵌套容器,深度历嵌套容器,[Python]代码
- mysql基本操作类,mysql基本操作,db.pyimport
- Python脚本写的命令行下的词典,python脚本,#!/usr/bin/e
- Python下载百度空间文章,,[Python]代码#
- python mysql insert delete query,pythonmysql,mysql python
- (34〇5 〇 6 〇 8 〇 9 〇 1) 〇 2=2008,,[Python]代码fr
- 从豆瓣自动获取mp3封面。 MP3与id3 名称互换,封面id3,
- 生成回文数,生成回文,[Python]代码fr
- PyQuery:文本统计的通用类,实现类SQL接口,pyquerysql,被引
评论关闭