string_scan.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:gibbersense 作者: smxlabs 项目源码 文件源码
def pattern_scan(string):


    words = string.split()
    wcount = len(words)

    eng_count = english_test(string)

    print "\n\t\tNumber of Wrods : ",  wcount
    print "\n\t\tEnglish words =", eng_count

    ratio = float("0.0")
    ratio = float(eng_count)/float(wcount)

    if (ratio > float("0.5")):
        print "\n\t\t> The given string is a collection of English words"
        return False 
    else :
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号