Among the 30 days in September 2018 (2018/09/01 ~ 2018/09/30), print out the dates that (1) have odd date numbers and (2) are Sundays.
Assume that we only know the fact that 2018/09/01 is Saturday.
For example, 2018/09/23 has odd date number 23 and it is Sunday.
Hint 1: We can use a “for” loop for 1, 2, …, 30.
Hint 2: We can use an “if” statement to check the above two conditions, for each value from the “for” loop repetition.
Hint 3: The date numbers of Sundays are 2, 9, 16, … What’s the pattern in these numbers?
문제가 이거구요 9월 한달내에서 특정일이 홀수일인지 짝수일인지랑 무슨요일인지 알려주는 프로그램인데요
예를 들어서 9월 1일은 토요일이고 홀수일입니다 이렇게요
date1 = int('20180901')
date2 = int('20180931')
for x in range(date1, date2):
if x % 2 == 0:
print("even number")
else:
print("odd number")
이건 제가 억지로 짜본건데 여기서 더 어떡개 해야될지 모르겠어요 도와주십쇼
과제는 혼자해 개색갸
너모 어료워요ㅡ
이건 초등학생도 푸는거고 언어 문제가 아니고 지능문제다
저는 전공자도 아닌데 이런 고통을 받고 잇네요 부탁드립니다,,,, 진짜 미치겟어요
질문 말머리사용해주세요.
https://www.구글.co.kr/search?client=ms-android-samsung-ss&biw=412&bih=408&ei=W4GyW9WAGMuW8wXO1YPoBA&q=짝수+홀수+판별&oq=짝수+홀수+판별&gs_l=mobile-gws-wiz-serp.3..0i7i30l2j0i30j0i8i30.887.1137..1400...0.0..0.1
주소에 구글을 영어로 바꾸시고 이런식으르 참조하세요
이런식으로 찾아보면 요일도 쉽게 찾을 수 있을겁니다.
ps. 나와서 얘기하는겁니다.@@