In [2]:
# 読書計画用スニペット
from datetime import date
import math
def reading_plan(title, total_number_of_pages, period):
current_page = int(input("Current page?: "))
deadline = (date(*period) - date.today()).days
remaining_pages = total_number_of_pages - current_page
print(title, period, "まで", math.ceil(remaining_pages / deadline), "p/day 残り",
remaining_pages, "p/", deadline, "days" )
print(date.today(), ":", current_page + math.ceil(remaining_pages / deadline), "pまで")
In [ ]:
reading_plan("『哲学は何を問うてきたか』", 38, (2020,6,15))
In [ ]:
reading_plan("『死す哲』", 261, (2020,6,15))
In [ ]:
reading_plan("『メノン』", 263, (2020,10,17))
In [ ]:
date(2020, 6, 20) - date.today()
Out[ ]:
In [3]:
reading_plan("『饗宴 解説』", 383, (2020,6,20))
In [ ]: