Year = input("year of birth:" )
Month = input("month of birth:" )
Day = input("day of birth:" )
Date_of_Birth = (str(Day) + "/" + str(Month) + "/" + str(Year))
print('Your Date of Birth is ' + Date_of_Birth)
d = date.today()
y = d.year
age = y - int(Year)
print('Your age is ' + str(age))
if ((int(Month)==12 and int(Day) >= 22)or(int(Month)==1 and int(Day)= 20)or(int(Month)==2 and int(Day)= 18)or(int(Month)==3 and int(Day)= 20)or(int(Month)==4 and int(Day)= 20)or(int(Month)==5 and int(Day)= 21)or(int(Month)==6 and int(Day)= 21)or(int(Month)==7 and int(Day)= 23)or(int(Month)==8 and int(Day)= 23)or(int(Month)==9 and int(Day)= 23)or(int(Month)==10 and int(Day)= 23)or(int(Month)==11 and int(Day)= 22)or(int(Month)==12 and int(Day)
Подробнее здесь: [url]https://stackoverflow.com/questions/27285725/zodiac-calculator-2-7-6-will-not-calculate-sign-line-error-date-not-defined-ne[/url]
[code]Year = input("year of birth:" ) Month = input("month of birth:" ) Day = input("day of birth:" ) Date_of_Birth = (str(Day) + "/" + str(Month) + "/" + str(Year)) print('Your Date of Birth is ' + Date_of_Birth) d = date.today() y = d.year age = y - int(Year) print('Your age is ' + str(age))
if ((int(Month)==12 and int(Day) >= 22)or(int(Month)==1 and int(Day)= 20)or(int(Month)==2 and int(Day)= 18)or(int(Month)==3 and int(Day)= 20)or(int(Month)==4 and int(Day)= 20)or(int(Month)==5 and int(Day)= 21)or(int(Month)==6 and int(Day)= 21)or(int(Month)==7 and int(Day)= 23)or(int(Month)==8 and int(Day)= 23)or(int(Month)==9 and int(Day)= 23)or(int(Month)==10 and int(Day)= 23)or(int(Month)==11 and int(Day)= 22)or(int(Month)==12 and int(Day)