This commit is contained in:
David Doblas Jiménez 2021-08-06 10:08:12 +02:00
parent 9cc30f5f84
commit 7aa931a3fc

View File

@ -2,4 +2,38 @@ def update_table():
"""
Update README.md with the timings of the solved problems
"""
text = read()
print(text)
def read():
"""
Read README.md
"""
with open("../README.md", "r") as f:
text = [line.strip() for line in f.readlines() if line.strip() != ""]
return text[-1:]
def write():
"""
Write to README.md
"""
pass
def execute(num):
"""
Execute script and return output
"""
import sys
sys.path.insert(0, "./Python/")
import Problem001
res = eval(f"Problem{num:0>3}.compute()")
print(res)
time = str(res).split(sep=" ")
print(time)
if __name__ == "__main__":
# update_table()
execute(1)