Python conditional syntax error

ساخت وبلاگ

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

back soft...
ما را در سایت back soft دنبال می کنید

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