dimanche 25 décembre 2016

Python how to convert the second value in a list to int

I am presently building a simple program that will determine a persons horoscope sign depending on the month and date they assign, I am running into issues checking the 2nd value in a list, I have to convert only the second value to an int, I'm sorry I know this is a pretty dumb question,

Here is what I have so far

user_day_month = input("Enter your birth month and day").lower().split(' ')
print(user_day_month)
    user_sign = ""

if (user_day_month[0]=="january" and user_day_month[1]>=20) or (user_day_month[0]=="february" and user_day_month[1]<=18):
    user_sign = "Aquarius"
    print(user_sign)

elif (user_day_month[0]=="february" and user_day_month[1]>=19) or (user_day_month[0]=="march" and user_day_month[1]<=20):
    user_sign = "Pisces"

Thank you for your patience, I look forward to hearing your recommendations

Aucun commentaire:

Enregistrer un commentaire