2023-09-28 23:23:55 +02:00
|
|
|
import sys
|
2019-07-17 03:17:21 +02:00
|
|
|
|
2021-07-04 02:34:45 +02:00
|
|
|
TEMPLATE = """
|
2019-07-17 03:17:21 +02:00
|
|
|
def euler_XXX():
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2021-03-23 19:42:57 +01:00
|
|
|
solution = euler_XXX()
|
|
|
|
print("eXXX.py: " + str(solution))
|
2021-07-04 02:34:45 +02:00
|
|
|
# assert(solution == 0)
|
|
|
|
|
2019-07-17 03:17:21 +02:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
2023-09-28 23:23:55 +02:00
|
|
|
def main():
|
|
|
|
try:
|
|
|
|
e = sys.argv[1]
|
|
|
|
except IndexError:
|
|
|
|
print("Provide Euler problem number for which to create template.")
|
|
|
|
return
|
2019-07-17 03:17:21 +02:00
|
|
|
filename = "e" + e + ".py"
|
|
|
|
with open(filename, "w") as f:
|
2021-07-04 02:34:45 +02:00
|
|
|
s = TEMPLATE.replace("XXX", e)
|
2019-07-17 03:17:21 +02:00
|
|
|
f.write(s)
|
2021-04-20 02:49:40 +02:00
|
|
|
|
2023-09-28 23:23:55 +02:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|