추가 '요일계산'
This commit is contained in:
parent
5a0ceaf5f0
commit
f77b33fd1f
|
|
@ -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)
|
||||||
Loading…
Reference in New Issue