摘要:
这个也是之前写的程序,现在把它贴上来#!/usr/bin/pythonimport osos.system('clear')def binsearch(seq,x,low,high): mid=(low+high)//2 if x==seq[mid]: print 'i find it' elif low>=high: print "i can't find it" elif x>seq[mid]: binsearch(seq,x,mid+1,high) else: binsearch(seq,x,low,mid-1) d 阅读全文
posted @ 2013-09-11 22:01
花瓣奶牛
阅读(362)
评论(0)
推荐(0)
摘要:
这个是之前写的半成品,但是一直没有好好的写完,今晚我把它补充完整,并且贴出了遇到的问题这个程序并没有处理中文,主要是python 2.7对于中文的支持太蛋疼了,虽然可以设置utf8编码,但是如果列表中的某个变量是中文的话,打就会打印出那种我看不懂的编码,我干脆懒得理了,我想自己用python来处理中文的需求基本没有,可能以后就是用python谢谢程序玩玩而已#!/usr/bin/python# -*- coding: utf-8 -*-from os import systemsystem("clear")def menu(): print "\t Welcome 阅读全文
posted @ 2013-09-11 21:43
花瓣奶牛
阅读(329)
评论(0)
推荐(0)

浙公网安备 33010602011771号