For loop with If and elif or else in python -
question 1:
just tried execute program getting syntax error
i=input('enter value of i') j in range(10): if i==j: print'the value of %d'%(i) elif i!=j: print'please enter valid value' else: print 'this not number'
the difference between below 2 codes code 1 ask input once , loop trying compare, while code 2 ask input each loop (10x)...
Comments
Post a Comment