Solve problem 121 in Python and update template creation lib

This commit is contained in:
2021-07-03 20:34:45 -04:00
parent d666888994
commit 43cffbfbb7
2 changed files with 51 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
FROM = 206
TILL = 206
FROM = 100
TILL = 100
template = """
TEMPLATE = """
def euler_XXX():
return 0
@@ -9,7 +9,8 @@ def euler_XXX():
if __name__ == "__main__":
solution = euler_XXX()
print("eXXX.py: " + str(solution))
assert(solution == 0)
# assert(solution == 0)
"""
@@ -20,6 +21,6 @@ for i in range(FROM, TILL + 1):
e = str(i)
filename = "e" + e + ".py"
with open(filename, "w") as f:
s = template.replace("XXX", e)
s = TEMPLATE.replace("XXX", e)
f.write(s)