euler/python/lib_create_templates.py

22 lines
370 B
Python
Raw Normal View History

2021-04-10 05:44:28 +02:00
FROM = 88
TILL = 90
template = """
def euler_XXX():
return 0
if __name__ == "__main__":
2021-03-23 19:42:57 +01:00
solution = euler_XXX()
print("eXXX.py: " + str(solution))
assert(solution == 0)
"""
2019-07-18 03:29:59 +02:00
for i in range(FROM, TILL + 1):
e = "0" + str(i)
filename = "e" + e + ".py"
with open(filename, "w") as f:
s = template.replace("XXX", e)
f.write(s)