Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- today = datetime.date.today()
- delivery_date = input("Tell me your deadline on the next format (dd/mm/aa): ")
- print("n")
- deadline = datetime.datetime.strptime(delivery_date, "%d/%m/%y").date()
- days = delivery_date - today
- print("You have", days.days, "days to finish your project.")
- weeks = days // 7
- remainder_days = days % 7
- print("You have", weeks.days, "weeks and", remainder_days.days, "days.")
- remainder_days = dias % 7
- TypeError: unsupported operand type(s) for %: 'datetime.timedelta' and 'int'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement