import datetime
def day():
user_choise = input("Date:")
date = datetime.date(2021, 12, 12)
date_pr = date.strftime(f"{user_choise}.%Y")
delta = datetime.timedelta(days=365)
delta1 = datetime.timedelta(days=366)
for i in range(21):
day = date_pr.strftime("%A")
print(date_pr, day)
date += delta
day()
Date:10.10
Traceback (most recent call last):
File "C:\Users\egorh\OneDrive\Рабочий стол\Python\Dz7_XE.py", line 17, in <module>
day()
File "C:\Users\egorh\OneDrive\Рабочий стол\Python\Dz7_XE.py", line 12, in day
day = date_pr.strftime("%A")
AttributeError: 'str' object has no attribute 'strftime'
for i in range(21):
day = date_pr.strftime("%A")