On Aug 11, 2016 12:15 PM, "Pallab Amway" <pallabam...@gmail.com> wrote: > > Respected sir > > Myself pallab kumar seal from India I am using python2.7 > in my window 7 but while I am using python to compile my program I am > getting following error > > Programe1 > > age = 21 > > if age < 12: > > print( "You ' re still a child!" ) > > elif age < 18: > > print( "You are a teenager!" ) > > elif age < 30: > > print( "You ' re pretty young!" ) > > elif age < 50: > > print( "Wisening up, are we?" ) > > else: > > print( "Aren ' t the years weighing heavy?" ) > > answer > > > expected an indented block >
Do you understand how Python uses consistent indentation to delineate blocks of code? If not, then you need to research this. Also, you say you're using Python 2.7. Python 2.x uses print *statements* => no parentheses, while Python 3.x uses print *functions*. Something else to read up on. Hope this gives you enough hints to work through your current problems! And I hope sending from my phone results in a plain text format! boB P.S.:. Do you have a good book or online tutorial to use? If not, there are plenty of such resources online. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor