You do not need the i > 0 condition; i starts as 1 and is multiplied with a positive number.
Also and 1 and and 0 will always evaluate to True rsp. False
So, you first code will print 14 times (i values 1, 2, 4, 8, .. , 8192)
The second code will not print at all.
The last code, - I'll leave it to you...
I assume the missing indents are only misprints, you need to indent the code block below the while statement.
EDIT: Sorry, I only now see that this is really a very old thread. I guess this in no longer relevant!
This post has been edited by DK3250: 11 November 2016 - 05:27 AM