Skip to content

Instantly share code, notes, and snippets.

@ayu-mushi
Last active July 8, 2021 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayu-mushi/e5794757d983f54b46e05c80574f960a to your computer and use it in GitHub Desktop.
Save ayu-mushi/e5794757d983f54b46e05c80574f960a to your computer and use it in GitHub Desktop.
起床時刻を入力するとご飯の時間や就寝時間を教えてくれるスクリプト
from datetime import datetime
#print(datetime.now().time().second)
kisyo = int(input("起床時刻: "))
# 朝ご飯
print("朝ご飯:",(kisyo+1)%24, "時")
# 昼ご飯
print("昼ご飯:",(kisyo+3)%24, "時")
# 夜ご飯
print("夜ご飯:",(kisyo+10)%24, "時")
# 睡眠
print("睡眠:",(kisyo+16)%24, "時")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment