추가 '요일계산'

This commit is contained in:
kim_yubin 2018-10-19 20:11:14 +09:00
parent 5a0ceaf5f0
commit f77b33fd1f
1 changed files with 15 additions and 0 deletions

15
요일계산 Normal file
View File

@ -0,0 +1,15 @@
month = int(input("월을 입력하세요 : "))
date_in = int(input("일을 입력하세요 : "))
date=[0,31,28,31,30,31,30,31,31,30,31,30,31]
week=["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
total=0
answer=''
t=0
while t < month:
total += date[t]
t+=1
total += date_in
answer = week[total%7]
print(answer)