摘要:
在ide中执行python程序,都已经在默认的项目路径中,所以直接执行是没有问题的。但是在cmd中执行程序,所在路径是python的搜索路径,如果涉及到import引用就会报类似ImportError: No module named xxx这样的错误,解决方法: 在报错的模块中添加: import 阅读全文
摘要:
不喜欢敲命令行,或者用惯TortoiseSVN的也可以使用TortoiseGit 1. TortoiseGit安装 安装很简单,默认安装就可以。需要安装以下几个软件: l Git-2.14.3-64-bit.exe l TortoiseGit-2.5.0.0-64bit.msi l Tortoise 阅读全文
摘要:
def cakes(recipe, available): d = [False for recipe_key in recipe.keys() if recipe_key not in available.keys()] if d: return 0 else: return min([available[recipe_key]/recipe... 阅读全文
摘要:
def get_sum(a,b): if a == b: return a elif a < b: return sum(range(a, b + 1)) else: return sum(range(b, a + 1)) def get_sum(a,b): return sum(xrange(min(a,b),... 阅读全文
摘要:
def persistence(n,countSum=0): num = 1 if len(str(n)) !=1: for i in str(n): num = num * int(i) countSum += 1 return persistence(num,countSum=countSum) els... 阅读全文