خرید بک لینک

Vote count: 0

I'm pretty new to python and currently I am working on an income tax calculator and the first step I want the user to do is press 1 if they are married and then press 2 if they are single. What do I need to do to fix this code ? My IDE says there is a syntax error on line 3 "if (answer == 1)"

        print ("If you are married press 1 if you are single press 2")
        answer = raw_input("")
        if (answer == 1)
           {
              print "Enter your income";
           }
           elif (answer == 2):
           {
              print "Enter your income";
           }

asked 19 secs ago

برچسب: python conditional syntax,python conditional expression syntax,python conditional statement syntax,codecademy python conditional statement syntax, نویسنده: استخدام کار تاريخ: چهارشنبه 14 مهر 1395 ساعت: 22:40

صفحه بندی