Skip to content

Karpov_lec_7#285

Open
cool07 wants to merge 1 commit into
masterfrom
cool07-patch-5
Open

Karpov_lec_7#285
cool07 wants to merge 1 commit into
masterfrom
cool07-patch-5

Conversation

@cool07
Copy link
Copy Markdown
Collaborator

@cool07 cool07 commented Sep 10, 2020

No description provided.

Comment thread Practice/Karpov_A/Lec_7/t7_1.py
Copy link
Copy Markdown
Collaborator Author

@cool07 cool07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import datetime
def working_day(start_date, end_date):
zoom = end_date - start_date
date = start_date
work_day = 0
for i in range (int(zoom.days)+1):
if date.weekday() < 5:
work_day += 1
date += datetime.timedelta(days=1)
return work_day
if name == "main":
print(working_day(datetime.datetime(2020, 9, 1), datetime.datetime(2020, 9, 28)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants